chameleon icon indicating copy to clipboard operation
chameleon copied to clipboard

[RFC] Browserlike Events

Open ZempTime opened this issue 4 years ago • 6 comments

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 into tabselect, if we decide that would be better than click). 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.

ZempTime avatar May 21 '20 15:05 ZempTime