-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
DataViews: remove selection correcting, set initial state #62796
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -30 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
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.
Nice improvements, thank you for working on this! In my tests, I did not find any regression and this is a good simplification to the selection management.
We probably need a better long-term solution for selection management, when a destructive action happens, but I guess the current solution is ok for now.
9e6d51c
to
2c82fda
Compare
eed8eb3
to
20db2cf
Compare
Fixed in 00737ac |
Flaky tests detected in 6dfee63. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9657299622
|
Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
What?
Just trying this as an alternative to both #62787 and #62792.
If DataViews doesn't try to correct the selection when items don't exist or are removed (I think that should be the concern of the implementor), then we can also simply set an initial state.
Why?
Reduces the amount of state setting in effects, which reduces the probability of infinite loops.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast