Closed t4y3 closed 9 months ago
@jake-figma What are your thoughts on adding the "each" syntax?
this is really interesting and love that you took the initiative to throw together a pr.
i'm considering another approach to this, referenced in #6 that would allow for child querying and be recursive. i am partial to that approach because it keeps the templating language simple, and is also agnostic to layer structure. sometimes the layering/grouping in figma is frustratingly deep so a children query would allow you to dive deeper more precisely than a loop would.
id like to keep this open for discussion, but dont want to add more overhead to the language quite yet.
i understand this wouldnt be the only scenario for an each loop, but im also interested in learning more about this use case generating definition code. is the idea that you add icons to this component set frequently and would rather copy paste the entire file code whenever that occurs?
due to the way component set templates are inherited by instances, this code would render incomplete definition snippets whenever you select an instance of this component, which seems annoying.
Yeah, idea #6 certainly sounds good and versatile!
Thank you. I'll end this issue. 😄
Yeah, idea #6 certainly sounds good and versatile!
Thank you. I'll end this issue. 😄
@t4y3, would love to hear more from you as we build out this project more this year! thanks for commenting and taking a peek. love your implementation, and was surprised to get such good feedback so soon lol!
Allow referencing of properties of child elements using the each syntax.
Example
Template
Snippet