From ee36ebc6ccd6becf57a7e346a083ec67546d973b Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Thu, 22 Jun 2023 22:33:39 +0900 Subject: [PATCH] Keyboard Shortcut: Clean up shortcut names (#51739) --- .../src/components/keyboard-shortcuts/index.js | 2 +- .../edit-post/src/components/keyboard-shortcuts/index.js | 2 +- .../src/components/keyboard-shortcuts/register.js | 2 +- .../src/components/keyboard-shortcuts/index.js | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/customize-widgets/src/components/keyboard-shortcuts/index.js b/packages/customize-widgets/src/components/keyboard-shortcuts/index.js index a83b730ddbb70..b7cdc1d42de86 100644 --- a/packages/customize-widgets/src/components/keyboard-shortcuts/index.js +++ b/packages/customize-widgets/src/components/keyboard-shortcuts/index.js @@ -127,7 +127,7 @@ function KeyboardShortcutsRegister() { } ); registerShortcut( { - name: `core/customize-widgets/transform-heading-to-paragraph`, + name: 'core/customize-widgets/transform-heading-to-paragraph', category: 'block-library', description: __( 'Transform heading to paragraph.' ), keyCombination: { diff --git a/packages/edit-post/src/components/keyboard-shortcuts/index.js b/packages/edit-post/src/components/keyboard-shortcuts/index.js index 5344d9155c8a4..432bce0a3bff5 100644 --- a/packages/edit-post/src/components/keyboard-shortcuts/index.js +++ b/packages/edit-post/src/components/keyboard-shortcuts/index.js @@ -184,7 +184,7 @@ function KeyboardShortcuts() { } ); registerShortcut( { - name: `core/edit-post/transform-heading-to-paragraph`, + name: 'core/edit-post/transform-heading-to-paragraph', category: 'block-library', description: __( 'Transform heading to paragraph.' ), keyCombination: { diff --git a/packages/edit-site/src/components/keyboard-shortcuts/register.js b/packages/edit-site/src/components/keyboard-shortcuts/register.js index 0574125ba476b..9660b03e762ed 100644 --- a/packages/edit-site/src/components/keyboard-shortcuts/register.js +++ b/packages/edit-site/src/components/keyboard-shortcuts/register.js @@ -129,7 +129,7 @@ function KeyboardShortcutsRegister() { } ); registerShortcut( { - name: `core/edit-site/transform-heading-to-paragraph`, + name: 'core/edit-site/transform-heading-to-paragraph', category: 'block-library', description: __( 'Transform heading to paragraph.' ), keyCombination: { diff --git a/packages/edit-widgets/src/components/keyboard-shortcuts/index.js b/packages/edit-widgets/src/components/keyboard-shortcuts/index.js index 7add778094c52..dff0ac57f78c1 100644 --- a/packages/edit-widgets/src/components/keyboard-shortcuts/index.js +++ b/packages/edit-widgets/src/components/keyboard-shortcuts/index.js @@ -70,7 +70,7 @@ function KeyboardShortcuts() { } ); useShortcut( - 'core/edit-widgets//transform-heading-to-paragraph', + 'core/edit-widgets/transform-heading-to-paragraph', ( event ) => handleTextLevelShortcut( event, 0 ) ); @@ -79,7 +79,7 @@ function KeyboardShortcuts() { //the hook will execute the same way every time //eslint-disable-next-line react-hooks/rules-of-hooks useShortcut( - `core/edit-widgets//transform-paragraph-to-heading-${ level }`, + `core/edit-widgets/transform-paragraph-to-heading-${ level }`, ( event ) => handleTextLevelShortcut( event, level ) ); } ); @@ -180,7 +180,7 @@ function KeyboardShortcutsRegister() { } ); registerShortcut( { - name: `core/edit-widgets//transform-heading-to-paragraph`, + name: 'core/edit-widgets/transform-heading-to-paragraph', category: 'block-library', description: __( 'Transform heading to paragraph.' ), keyCombination: { @@ -191,7 +191,7 @@ function KeyboardShortcutsRegister() { [ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => { registerShortcut( { - name: `core/edit-widgets//transform-paragraph-to-heading-${ level }`, + name: `core/edit-widgets/transform-paragraph-to-heading-${ level }`, category: 'block-library', description: __( 'Transform paragraph to heading.' ), keyCombination: {