-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Adding interaction states for headless widgets. (ui only) #19349
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
base: main
Are you sure you want to change the base?
Conversation
@alice-i-cecile @cart This PR contains only the |
Also please note the release notes are incomplete, and will be revised in follow-on PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why you think we should use immutable components for the accessibility updates, rather than ordinary systems?
I don't feel strongly about this, but my reasoning goes something like this:
All that being said, there are some advantages to using mutable components here: it makes the observers for input events simpler, since we can just mutate the states directly and don't have to resort to commands. It's a trade-off, and I am not expert enough to know which option is better. |
Hmm. This departs from our designs elsewhere, but it's also a new set of tools. I really like being able to quickly respond to "a button was pressed" using the immutable components trick without having to iterate the whole set, and I would also very much like to avoid adding more callsites for RemovedComponents. I'm alright with this design, but it should be swapped to use global observers added in the |
Part of #19236
This PR contains struct definitions for the low-level interaction states used by the headless widgets.
Testing
Tests will be in subsequent PRs. This PR contains only the basic data structures and hooks.