-
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: don't register shortcuts for preview editors #57984
Conversation
Size Change: +832 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
@@ -70,6 +70,7 @@ export function BlockPreview( { | |||
<ExperimentalBlockEditorProvider | |||
value={ renderedBlocks } | |||
settings={ settings } | |||
inert={ true } |
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.
There's probably more that we can eventually do for "inert" editors, but this is a good start. @youknowriad I'd love your opinion here. I'm also unsure about the naming. Maybe inert makes it sound like you can't interact with it, but you'd need to fix that yourself.
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 have a __unstableIsPreviewMode: true
flag, we shouldn't be introducing a new one. For me it's just the same as "inert" prop here.
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.
Ah, I didn't know about __unstableIsPreviewMode
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.
This is even better :)
Flaky tests detected in db65d2e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7588692300
|
What?
We don't need shortcuts in previews and registering these takes time and causes store updates.
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast