-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: use context for useBlockEditingMode #57950
Conversation
Size Change: +25 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
const { clientId = '' } = useBlockEditContext(); | ||
const blockEditingMode = useSelect( | ||
( select ) => | ||
select( blockEditorStore ).getBlockEditingMode( clientId ), |
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.
Where is this value filled in the context now (I failed to follow your changes). Where is this call being made basically.
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.
We already make it:
blockEditingMode, |
1d11555
to
fbab0eb
Compare
What?
Alternative to #57941.
Removes a block-editor store subscription from all paragraphs and headings, potentially also other blocks.
Why?
Fixes performance regression from #57906.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast