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.
This PR is an initial pass at getting event-handling up and running for all components. This approach feels inefficient to me because there is so much duplicated code, so I am definitely open to other solutions here. 🙇
The
BrightwheelComponent
superclass contains empty methods to make it easier for folks to extend component functionality without having to figure out whether or not a component supports a particular event. This means all components will theoretically support calls to all DOM events that Etch supports. This isn't necessarily practical since not all calls make sense on all types of components though.One next step we could take would be to remove superfluous event handlers from components where they don't make sense. An additional step would be to move the catch-all event-handling methods out of the superclass and into the individual component classes themselves. I'm not sure what kind of headaches that could create down the road.
Long term, I think it also makes sense to break some of these components apart a bit more. For instance, the
Table
component is monolithic at the moment. Breaking it apart into smaller components would allow us to offer more granular event handling.Steps before merging