Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main work here is surfacing the open/close events from the Materialize collapsible component in friendly ways for the Aurelia developer. The developer can hook these events in one of two ways:
.call
expression in the attribute to directly bind a function call on their view model via the newonOpen
andonClose
properties (note:on-open
andon-close
in attribute syntax!).EventAggregator
infrastructure where two new events are published in the form of:aurelia-md-bridge:collapsible:[open|close]
. I would especially like feedback on whether or not you guys want the framework to be publishing viaEventAggregator
and, if so, if you "like" the naming scheme I've chosen.NOTE: this also adds a new sample for the Collapsible component from this gist to demonstrate how both approaches could be used to the caller. If you think these should be broken up into two different samples I can certainly do that.
Ancillary work included here just updates some project level settings to make the project more friendly to work with (at least from VSCode). Details in commit message for 669e8db should be pretty straightfwd so I won't repeat them here.