-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Move block toolbar check to before rendering the block toolbar #60480
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: -1 B (0%) Total Size: 1.73 MB
ℹ️ View Unchanged
|
|
@jeryj, should we close this? |
|
The PR seems like it should be a performance improvement. I'm not sure it ends up being a performance improvement in practice though. I'm fine closing it though. |
|
@jeryj, I'll try to rebase and retest it. P.S. I'm going through some old PRs and mostly checking what can be closed. Thanks for the reply. |
What?
Trying to improve performance of block toolbar.
Why?
🏇🏻
How?
There's a check within block toolbar for
hasBlockToolbarthat happens after a useSelect. IfhasBlockToolbaris false, we know we won't show the toolbar, so there's no reason to make auseSelectafterwards. However, I don't think this will speed up anything for block toolbars that do render, just for the times where there is no block toolbar.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast