Reduce inspector subscriptions by not subscribing if panel is not enabled#73013
Reduce inspector subscriptions by not subscribing if panel is not enabled#73013
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: -4 B (0%) Total Size: 2.47 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 4747822. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19148052756
|
Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
What?
Uses the existing isEnabled check to not subscribe to the store when the currently selected block does not have access to that panel.
Why?
Minor perf, but it adds up.
How?
If the panel is not enabled and will return null, don't subscribe to the store. I didn't add the dimensions panel here, as that work is done in Perf: Only mount SpacingVisualizers when actively visualizing
Testing Instructions
Everything should work the same as on trunk. Look for errors in the inspector panel.
Testing Instructions for Keyboard
Screenshots or screencast