:dna: UI Combinators: express complex UIs by compo...
# share-your-work
m
🧬 UI Combinators: express complex UIs by composing a small set of combinators and terminals 🌳 Combinators: Option, Alternatives, List & Record 🍁 Terminals: Int, Float, Bool, ConstantSet (select), Text, Color, Date, Time etc

https://www.youtube.com/watch?v=5VMiwcWHzEs

m
I'd like to see this in combination of your foldable UIs to switch between the nested combinator UI & a condensed (maybe text) syntax. Bonus would be able to click on parts of the dense UI & expand & focus to the combinator which controls that part.
m
yep, I will add back the fold in a generic way, when you switch between alternatives the new one will get the last one as argument, if it knows how to create an instance from it, it will, if not it will return the default instance. This way the previous demo will work as is in case you have an Alt of UrlText and UrlRecord
b
Type based UIs!!!
m
in a sense yes, but also I noticed those "combinators" in other places like peg parsers and regular expressions, it seems they are some sort of fundamental combinators we keep coming up with and naming differently 😛
from ohmjs docs: Rules (record), Sequence (List), Alternation (Alternatives), Terminal, Terminal Range (Enum)
inb4 category theory, homotopy type theory or something like that 😄