-
Notifications
You must be signed in to change notification settings - Fork 3.8k
feat: Add CSS classes for more focus states. #9046
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: develop
Are you sure you want to change the base?
feat: Add CSS classes for more focus states. #9046
Conversation
This adds better tracking support and is not yet completed.
NB: This isn't completed yet as subtrees still need to be added, and a lot more testing needs to be conducted. I'm also unlikely to be comfortable merging this without new focus manager tests as the edge cases here can be quite complex. |
I was originally pushing to try and get this into v12, though while that has become increasingly less likely as v12 approaches launch I also no longer want to. The CSS changes for fields and trees are relatively benign, but adding the new CSS classes for subtrees actually introduces non-trivial risks:
While I actually expect the overall changes to end up being safe and sufficiently performant, the risk is too high to risk trying to rush this into v12. |
This is not finished or working yet.
…ocus-states Conflicts: core/focus_manager.ts
This ensures that it updates when the focused node changes. This will, of course, need thorough testing due to the bunch of possible edge cases.
I think this actually implements all of the CSS classes that we need per #9044 except for the subtree ones. Those are...a bit hard to implement correctly. I'm actually considering inverting the way subtrees are provided so that they are actually indicated through registration. This will probably require us to do cycle checking, but the current pattern doesn't prevent that and we don't currently check for it. :) The advantage of explicit registration is that it would make it much easier to notify parents when something changes in a subtree, including multiple levels of updates, such as active/passive focus changing, i.e., this PR. Since we already require trees to register, this isn't a big difference in management for callers and, to some extent, actually makes things a bit easier for ensuring that unregistered subtrees aren't accidentally represented. That's a pretty big change, and we'll need to file a follow-up bug to fully remove the nested trees function in v13. For now I think we can deprecate the function and remove all calls to it (plus update its documentation accordingly). Basically no one should be using subtrees outside core, anyway. |
The basics
The details
Resolves
Fixes #9044
Proposed Changes
TODO: Finish this PR description.
Reason for Changes
Test Coverage
Documentation
Additional Information