-
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: Introduce the 'useBlockLock' hook #40210
Conversation
Size Change: -8 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
packages/block-editor/src/components/block-lock/use-block-lock.js
Outdated
Show resolved
Hide resolved
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 did some manual testing and everything seems to work well.
This is a nice code quality improvement 👍
Thank you, @talldan. |
* Block Editor: Introduce the 'useBlockLock' hook * Use the new hook * Use 'canLock'
This PR was cherry-picked for Gutenberg plugin release v13.0 and WordPress 6.0 Beta 1. |
Hi, @bph It isn't a public API, or it won't be in WP 6.0. So there's no need for DevNote. |
What?
The follow-up to #40088 (comment).
PR introduces a new
useBlockLock
and makes it easier to access block status.Why?
The new hook will reduce the boilerplate code required to get block lock status.
Testing Instructions
E2E tests are passing.