Block Editor: Introduce the 'useBlockLock' hook#40210
Merged
Conversation
|
Size Change: -8 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
talldan
reviewed
Apr 11, 2022
packages/block-editor/src/components/block-lock/use-block-lock.js
Outdated
Show resolved
Hide resolved
talldan
approved these changes
Apr 11, 2022
Contributor
talldan
left a comment
There was a problem hiding this comment.
I did some manual testing and everything seems to work well.
This is a nice code quality improvement 👍
Member
Author
|
Thank you, @talldan. |
Member
Author
adamziel
pushed a commit
that referenced
this pull request
Apr 11, 2022
* Block Editor: Introduce the 'useBlockLock' hook * Use the new hook * Use 'canLock'
Member
|
This PR was cherry-picked for Gutenberg plugin release v13.0 and WordPress 6.0 Beta 1. |
37 tasks
Member
Author
|
Hi, @bph It isn't a public API, or it won't be in WP 6.0. So there's no need for DevNote. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
The follow-up to #40088 (comment).
PR introduces a new
useBlockLockand 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.