Closed (fixed)
Project:
Experience Builder
Version:
0.x-dev
Component:
Page builder
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Nov 2024 at 20:32 UTC
Updated:
17 Dec 2024 at 18:04 UTC
Jump to comment: Most recent
Comments
Comment #3
larowlanI was able to do the easy bits here - prop wrappers for when we're not inside an element or attribute, and wrappers for the component.
For the props-no-slots component in the xb_test_sdc module we get this
Comment #4
larowlanGetting HTML attribute support will require a full syntax tree that mixes twig nodes with HTML - which is what I'm working on in a separate PHP library. But I think this is a good step forward.
Comment #5
jessebaker commentedJust adding a comment for extra visibility in case my comment on the MR was missed.
Would you be able to change the HTML comments so that there is a difference between a comment wrapping a slot and a comment wrapping a prop?
Comment #6
larowlan.
Comment #7
wim leersTIL this was happening!
VERY cool! 🤩
A bunch of question/requests for clarification, but I think this is close to ready already 😄
Comment #8
wim leersOnce the bits I do not fully grok yet are clarified by @larowlan, I will approve + merge because the #1 requirement is met:
— @jessebaker stating that this unblocks him on next steps!
The #2 requirement is that I and others understand this sufficiently to maintain/improve this in case @larowlan is unavailable — and that's essentially what my review focuses on 😊
Comment #9
wim leersThis will enable #3491021: Leverage HTML comment annotations, remove wrapping div elements ! 🚀
Comment #11
larowlanAddressed feedback
Comment #12
wim leersComment #13
wim leersWhile I definitely don't grok every detail of
XbTwigExtension, the docs @larowlan added make it 100x more clear what it does. I'm confident now that somebody can step through it with a debugger and combined with @larowlan's comments understand what is going on, and iterate on his work 👍The things least clear to me at this point:
$node->hasAttribute('data')and its meaning?!$node->hasAttribute('name')and its meaning?!… but turns out that this is just (AFAICT undocumented, and hard to search for) Twig's architecture, because
\Twig\Node\TextNode::compile()uses it too! 🤷Comment #15
wim leersComment #16
wim leersThis unblocked #3491021: Leverage HTML comment annotations, remove wrapping div elements ! 🚀