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
There are cases when we have a block which have a few optional modifiers. These modifiers can be included to bundle at the same time or separately. And in the case when they are included together the order becomes important.
I'm propose feature like include: false, but more understandable for community.
Consider the example.
Block filter is just a button in the common case.
block('filter').content()({ block: 'button' });
It have optional ability to show tooltip on mouseover. Code for this feature locate in the modifier _hoverable_yes. Template of this modifier adds to content the tooltip.
Also block have other optional ability to turn into dropdown. Code for this feature locate in the modifier _changable_yes. Template of this modifier replace content of the main template to dropdown.
@zxqfox yes, it seems right.
Section optionalMustDeps mean that entities inside it must be included to build before current entity when they are participate in build. That is, if neither one block not require entities which specified in optionalMustDeps – these entities will not be included into the build.
There are cases when we have a block which have a few optional modifiers. These modifiers can be included to bundle at the same time or separately. And in the case when they are included together the order becomes important.
I'm propose feature like
include: false
, but more understandable for community.Consider the example.
Block
filter
is just a button in the common case.It have optional ability to show tooltip on mouseover. Code for this feature locate in the modifier
_hoverable_yes
. Template of this modifier adds to content the tooltip.Also block have other optional ability to turn into dropdown. Code for this feature locate in the modifier
_changable_yes
. Template of this modifier replace content of the main template to dropdown.Now, on case when block has both these modifiers order becomes important. We can declare it in the
filter_hoverable_yes.deps.js
.Guys what do you think about it?
The text was updated successfully, but these errors were encountered: