https://futureofcoding.org/ logo
#share-your-work
Title
# share-your-work
m

Mariano Guerra

09/15/2023, 3:33 PM
🧬 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

Marcelle Rusu (they/them)

09/15/2023, 4:26 PM
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

Mariano Guerra

09/15/2023, 7:09 PM
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

Brian Hempel

09/15/2023, 11:51 PM
Type based UIs!!!
m

Mariano Guerra

09/16/2023, 8:59 AM
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 😄