-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Don't subscribe to store unless fitText option is enabled #72634
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
|
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: +5 B (0%) Total Size: 2.19 MB
ℹ️ View Unchanged
|
Mamaduka
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.
Good catch, @jeryj!
|
Flaky tests detected in 382080d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18750757241
|
|
@jorgefilipecosta FYI :) |
|
Oof, we should have caught this. :) |
|
Thank you a lot for catching and fixing this! I think we did not caught this because on the initial version we had: So useBlockProps and consequently useFitText would only load if fitText attribute was there. Recently we changed because we started to depend on fontSize and style too which caused to hook to run on unexpected situations and caused the issue, it was a more recent change. But still ideally during the addition of keys we could have caugh this, I'm glad it was caught. I guess it should be part of beta if it is not already. |
|
I just cherry-picked this PR to the wp/6.9 branch to get it included in the next release: 1383085 |
What?
#71904 added useFitText, which subscribes every block to monitor every attribute change, even if the option is disabled.
Why?
Perf cleanup.
How?
If the option is not enabled (true) or the block doesn't have fit text support, don't subscribe to the store.
Testing Instructions
There should be no changes
Testing Instructions for Keyboard
Screenshots or screencast