You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the introduction of nesting, using the shopify:block:select and shopify:block:deselect became a bit complicated. For instance, if I select a slide, I want to turn off autoplay of the slideshow, but selecting a children of the slide should still keep the autoplay turned off. However, this will trigger the deselect event of the slide.
I suggest that two new events would be added:
shopify:block-group:select => this event would be fired if this group or any of its children is selected. If a nested block is selected, then the event must be triggered as well to all parents.
shopify:block-group:deselect => this event would be fired only if we switch to a block that is not itself or one of its descendants. Similarily, if a nested block is deselected, the event should also be triggered to all parents.
EDIT: I think that in order to make this easier to handle, it should be better if those events would be triggered on the target and would NOT bubble.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With the introduction of nesting, using the
shopify:block:selectandshopify:block:deselectbecame a bit complicated. For instance, if I select a slide, I want to turn off autoplay of the slideshow, but selecting a children of the slide should still keep the autoplay turned off. However, this will trigger the deselect event of the slide.I suggest that two new events would be added:
shopify:block-group:select=> this event would be fired if this group or any of its children is selected. If a nested block is selected, then the event must be triggered as well to all parents.shopify:block-group:deselect=> this event would be fired only if we switch to a block that is not itself or one of its descendants. Similarily, if a nested block is deselected, the event should also be triggered to all parents.EDIT: I think that in order to make this easier to handle, it should be better if those events would be triggered on the target and would NOT bubble.
The goal would be to do something like this:
If the event would bubble, then any deselect event on nested blocks would be captured on the parent. Of course we could check the event directly:
But I think that not bubbling would be a more pragmatic usage considering the goal of such events.
Beta Was this translation helpful? Give feedback.
All reactions