-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Editor: Improve the 'Design' sidebar panel performance #71333
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
Conversation
| }, [] ); | ||
| const { editEntityRecord } = useDispatch( coreStore ); | ||
| const availablePatterns = useAvailablePatterns( record ); | ||
| const availablePatterns = useAvailablePatterns( { area, name, slug } ); |
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.
Initially, I thought of using memoization and passing the partial record, but I think this way it's more visible what data is expected.
|
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. |
|
Side note: Jumpiness caused by the "Content" panel height change is still annoying, but that might be hard to fix without a complete redesign. ScreencastCleanShot.2025-08-25.at.12.37.34.mp4 |
|
Size Change: +31 B (0%) Total Size: 1.92 MB
ℹ️ View Unchanged
|
fd1b9bc to
6f7b58c
Compare
|
Flaky tests detected in 723f091. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17207730649
|
6f7b58c to
723f091
Compare
tyxla
left a comment
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.
Great improvement - simple but effective. Tests well for me.
Thanks @Mamaduka 🚀
|
Retriggered the failing tests, none of the failures appears related |
|
Thanks for the review, @tyxla!
Yes. Seems like Docker server issues, which happen from time to time. I'm going to merge this. There's the same failure on the trunk. We don't have control over the Docker server status :/ |
What?
"Stacks" on #71332.PR tries to improve the "Design" sidebar panel performance by avoiding unnecessary re-renders every time a record is updated. The data needed for filtering patterns doesn't change often, and the panel doesn't have to react to content edits.
Rendering previews can be expensive. Components should avoid re-rendering them when possible.
Why?
Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
Templates
Before
CleanShot.2025-08-25.at.12.41.44.mp4
After
CleanShot.2025-08-25.at.12.42.20.mp4
Template Parts
Before
CleanShot.2025-08-25.at.11.58.13.mp4
After
CleanShot.2025-08-25.at.11.57.23.mp4