-
Notifications
You must be signed in to change notification settings - Fork 137
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
New component events #297
New component events #297
Conversation
Would you consider |
Also, for the over events, how do you feel about also perhaps sending a cursor position? (Great work, btw!) |
Hey @crertel sorry for the long delay to reply you and thanks for your suggestions! Sure, About sending the cursor position on the My thoughts about this is should anyone need the cursor position they should request the |
I'm pretty flexible on this...I'm thinking that it might be helpful for cases where we want to handle something local to the component (say, updating a gradient or some other UI effect) and doing it elsewhere could be clunky. Not super wed to it though--what do you think? :) |
a866c56
to
9a736ae
Compare
@crertel I tried to run |
Hey @crertel would you mind to run the CI/build action again? I've checked and it seems all good: Many thanks and sorry for the pings 🙂 |
9a736ae
to
1b98178
Compare
Looks green! Great work, I bet folks will get some good use out of these. Very sorry for the delay on our side. Lemme page @axelson in too, but I'm liking this. |
Description
This PR adds new events to the following built in components:
Scenic.Component.Button
{:btn_pressed, id}
- sent when a button is pressed{:btn_released, id}
- sent after the button is releasedScenic.Component.Input.TextField
{:focus, id}
- sent when a text field is "active", i.e., is ready to receive inputs{:blur, id}
- sent when a text field becomes "inactive", i.e., will not receive inputsScenic.Component.Input.Dropdown
{:dropdown_opened, id}
- sent when the dropdown opens{:dropdown_closed, id}
- sent when the dropdown closes{:dropdown_item_hover, id, item_id}
- sent when and item is hoveredMotivation and Context
Those new events are very helpful in certain scenarios.
Types of changes
not work as expected)
but make things better)
Checklist