What does a type system for GUI widget design look like?
Conversation
Design systems are an interesting use case. A central design team makes widgets that follow a consistent design style, with accessibility support etc. and product teams then use that to build their stuff.
1
1
A type system in this use case could help to support maintaining the APIs across teams, and helping upgrades across a large code base, but it doesn't replace good design sense. It can make thinking about affordances clearer perhaps.
1
1
Also could make generative testing of edge-case inputs easier. This could be used with a component browser to ensure that edge cases are properly handled (eg. exotic line directions, weird combinations of combining characters, etc). Might need to be manually verified though.
1
1
But yeah, when you get into the nitty gritty of aesthetics, it begins to intertwine with the weird/messy API of the brain. Like with optical illusions for instance - like a circle and a square of the same dimensions won't look the same size, so you need to compensate.
1
And you can't really type check colour usage for instance - it is highly dependent on cultural context and what colour space your user's eyes support (ie. different types of colour blindness). Well... perhaps you could, but I'm guessing it'd be to unwieldy to be useful…
Oooh, now this is actually interesting! Just out from PLDI: Verifying That Web Pages Have Accessible Layout
1

