-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Block Editor: Optimize 'anchor' inspector controls #55721
Conversation
Size Change: -145 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
@dcalhoun, I would appreciate your feedback if this change is okay for the mobile builds 🙇 |
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.
Looks good 👍
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.
I tested the changes on an iPhone 15 Pro simulator and Pixel 3 XL emulator. I did not encounter any regressions. 🚀
Thanks for the ping!
What?
This is similar to #55345.
A micro-optimization for
anchor
inspector controls to avoid callinguseBlockEditingMode
for every block rendered in the editor and only render control when a block is selected.Why?
This control is only needed when editing a block.
How?
I tried to keep the changes to a minimum. PR extracts essential logic for the field into a separate component, only rendered when the block supports an
anchor
and is selected.Testing Instructions
Testing Instructions for Keyboard
Same
Screenshots or screencast