Skip to content
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

Add: Block editor keyboard shortcuts on the widgets screen #19432

Conversation

jorgefilipecosta
Copy link
Member

Description

This PR adds the normal block editor shortcuts to the widgets screen.

How has this been tested?

On the widgets screen:
I verified I could duplicate blocks using cmd + shift + d.
I multi-selected some blocks and verified I could delete them using backspace.

@jorgefilipecosta jorgefilipecosta added [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Package] Edit Widgets /packages/edit-widgets labels Jan 6, 2020
@@ -23,6 +24,7 @@ function Layout( { blockEditorSettings } ) {
return (
<SlotFillProvider>
<DropZoneProvider>
<BlockEditorKeyboardShortcuts.Register />
Copy link
Contributor

@youknowriad youknowriad Jan 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we include <BlockEditorKeyboardShortcuts /> elsewhere on this screen? (we need both the registration and the application of the shortcuts to make them work)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we already were applying them here https://github.com/WordPress/gutenberg//blob/cc378e8f09a1d74bc8982e453a532e8c78d52225/packages/edit-widgets/src/components/widget-area/index.js#L127. Before there was no need to register them and things worked now, this PR adds the registering, so the shortcuts continue to work.

@jorgefilipecosta jorgefilipecosta merged commit cb9ee1c into master Jan 7, 2020
@jorgefilipecosta jorgefilipecosta deleted the add/block-editor-keyboard-shortcuts-on-the-widgets-screen branch January 7, 2020 10:03
@ellatrix ellatrix added this to the Gutenberg 7.3 milestone Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Package] Edit Widgets /packages/edit-widgets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants