Closed cobbdb closed 6 years ago
This could lead into more advanced slot selection using css syntax - leverage Sizzle maybe?
harmony('.some-group #some-slot').action(); // applies to this slot
harmony('#some-slot').action(); // applies to this slot
harmony('.some-other-group #some-slot').action(); // applies to this slot
harmony('.some-group').action(); // applies to all slots in group
Can already access a single slot with harmony.slot()
, but the only functionality missing is apply an action to all slots in a group:
harmony.group('some-group').action();
Would require inversion of control with how actions are applied to slots. Right now global applies to the slot, but this change would require that the slot owns the action. EX - instead of:
harmony.show.slot('RP01');
... would become this ...
harmony.slot('RP01').show();
Inverting control of slot actions isn't necessary here, in fact the way it is now is the correct flow of control and to invert would be an anti-pattern.
Updating issue description with more detailed use-case.
Use-case here is -
given slot
RP01
exists in groupsnav-menu
andfull-width
.Both of the following calls should affect
RP01
: