chameleon
chameleon copied to clipboard
[RFC] Browserlike Events
Problem I'm wondering if it would behoove us to:
- Stick with existing browser-event names where possible
- When and where it becomes prudent to introduce a new event, we maintain a browser-like like (ex:
tabselect
).
What's a browserlike event?
A short, all-lowercase, no delimiter imperative phrase like "click" or "mousemove".
If we need to use a delimiter, we could use -
:
.
etc
Rollout: This would involve two phases:
- Minor version bump: we expose new events, support old events with a deprecation notice when consumed (so
chameleon.tab-selected
turns intotabselect
, if we decide that would be better thanclick
). Events continue to work as-is. - Major version bump after that: we remove support for non-browserspaced-events.
Questions & Research:
- [x] Is it possible to detect when an event is consumed by a listener and only display deprecation notices in those places?
- [x] Audit other existing component libraries and understand if there are any existing cowpaths here.