-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Browserlike Events #345
Comments
I feel as though we should provide some guidance how/where to specify and use events. Event GuideIn General:
Should I prefix with What if my event is like a browser event? Is my event letting others places know something happened? [rfc note: if a component can have local state, then they're not strictly unidirectional, and we shouldn't advertise this component library that way. Maybe, "conveniently" unidirectional] For example, it makes complete sense for Is my event a part of the imperative interface of my component? For example, the sheet listens for a Should I send more than one kind of event for different states? If it really simplifies or streamlines implementation, yes. |
I agree 100% with dropping prefixes, especially given that most of the events that we are capturing live within the same component as the import, so you’re right, it should be pretty clear where that event came from (not to mention, Something worth noting here is that a lot of our form elements, we actually can just rely on their underlying native events (this might require some research follow up to see if the native events are composed or not). On that note too, I do think we should be very explicit when and when not to use composed events. Do you know of any prior art/literature on that? I also think there should be more clear guidance on imperative events and the verbiage we use around it. I prefer past tense actions like |
Re: existing cowpaths. No, I'm unaware of any. In the case of So this is a case where we're actively, trying to expose a method in an imperative fashion, and our way of doing that is through an I think relying on underlying native elements is the right way to go, although these will themselves contain uncontrolled state. |
Given everything that’s been mentioned here, I’m going to add a draft write up to the wiki (mostly just going to copy what you’ve written here) and we can ratify it once we feel that everyone has had a sufficient time to provide their feedback. |
Here's a brief runthrough of current events, and their future state (if any obvious ones according to these guidelines). I think we're going to need to apply some thought to some of these.
|
As a point of clarity, |
Problem
I'm wondering if it would behoove us to:
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
-
:
.
etcRollout:
This would involve two phases:
chameleon.tab-selected
turns intotabselect
, if we decide that would be better thanclick
). Events continue to work as-is.Questions & Research:
The text was updated successfully, but these errors were encountered: