Hacker News new | ask | show | jobs
by Existenceblinks 1367 days ago
Logic-less template is ok despite some having loop because semantically, users also want to list things, add a thing to a list. I wouldn't add `if/else` but switch-case (this simulates category in user space, not complex condition). "Local variable" shouldn't be exposed to users. Collection name is ok. I think Shopify's Liquid is good, they just can't figure out decent UX on top of it.
1 comments

A logic-less template is easily done, by exposing a few methods to the programmer providing the data. I remember Android XMLs to be logic-less and while it refers to concrete classes, something like this could easily be adapted to generate text. A designer wouldn’t need conditionals or loops because he could mark something as a container, the goes on to design the content (for loop, each cell). Desktop and Mobile had this for ages.

I’d be more than happy if a more powerful version of figma existed (capable of handling UI states). Then the designer would then hand the design files annotated with IDs to me, and then I could go on to implement logic. If we agree on some sort of contract for the UI, he can go play to his heart’s content with the Look and Feel.

I have this idea in mind, how do think about 1 AST <-> 3 different UIs? Content editor, Developer, Designer. Each expose different things but shared AST. Because I think 1 UI with mixed bag contracts is not going to do it.