-
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
Columns: Batch vertical alignment updates #58801
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 Core SVNCore Committers: Use this line as a base for the props when committing in SVN:
GitHub Merge commitsIf 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: -56 B (0%) Total Size: 1.71 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.
LGTM!
Before: Multiple history records are created
before.mp4
After: Only one history record is created
after.mp4
P.S. While testing this PR, I discovered an interesting bug regarding column width recalculation.
Thanks for testing, @t-hamano, and good catch 🎣 |
What?
PR updates the "Columns" block to batch vertical alignment updates and avoids creating multiple history records. I've also refactored the component to use a
dispatch
hook instead of HoC.Why?
The
updateAlignment
is a single action, so it should create a single history entry.How?
The fix is contained in this commit - f4a89a0.
updateBlockAttributes
. It will update multiple blocks whenclientIds
is an array.registry.batch
method.Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
CleanShot.2024-02-08.at.08.06.18.mp4
CleanShot.2024-02-08.at.08.04.02.mp4