-
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
Allow setting block editing mode with specific clientId when no context available #51271
Conversation
Size Change: +8 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
Flaky tests detected in eb61716. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5189621289
|
I'd prefer that callers that need to specify an explicit |
We can close this as the associated actions serve the same purpose. |
What?
Allows consumers of
useBlockEditingMode
to pass a specific clientId for situations whereBlockListBlockContext
is not available.Co-authored-by: Ben Dwyer [email protected]
Why?
In #39286 we realised that in certain situations you will need to set the mode when you are outside a block list context. This change enables that whilst preserving the utility of the hook in "get" usage.
Here is the specific code.
How?
Adds an optional
clientId
argument which will take precedence over the value from context if provided.Testing Instructions
The same change is in #39286 so test there following the testing instructions and clicking through into focus mode for a Navigation and checking that the "edit" controls are disabled for the Navigation block.
Testing Instructions for Keyboard
Screenshots or screencast