diff --git a/packages/commands/src/components/command-menu.js b/packages/commands/src/components/command-menu.js index 75bc6f4e827a2..9f59db3f6f53c 100644 --- a/packages/commands/src/components/command-menu.js +++ b/packages/commands/src/components/command-menu.js @@ -41,7 +41,7 @@ function CommandMenuLoader( { name, search, hook, setLoader, close } ) { { commands.map( ( command ) => ( command.callback( { close } ) } > ( command.callback( { close } ) } > { @@ -22,7 +22,7 @@ export function useAddPostTypeCommands() { }, } ); useCommand( { - name: 'add new page', + name: 'core/add-new-page', label: __( 'Add new page' ), icon: plus, callback: () => { diff --git a/packages/core-commands/src/site-editor-navigation-commands.js b/packages/core-commands/src/site-editor-navigation-commands.js index 310b0c1c1e17a..1bf29fa08f9ce 100644 --- a/packages/core-commands/src/site-editor-navigation-commands.js +++ b/packages/core-commands/src/site-editor-navigation-commands.js @@ -66,7 +66,8 @@ const getNavigationCommandLoaderPerPostType = ( postType ) => ? { canvas: getQueryArg( window.location.href, 'canvas' ) } : {}; return { - name: record.title?.rendered + ' ' + record.id, + name: postType + '-' + record.id, + searchLabel: record.title?.rendered + ' ' + record.id, label: record.title?.rendered ? record.title?.rendered : __( '(no title)' ), diff --git a/packages/edit-site/src/hooks/commands/use-edit-mode-commands.js b/packages/edit-site/src/hooks/commands/use-edit-mode-commands.js index 59071a4088f42..67b7164edcdab 100644 --- a/packages/edit-site/src/hooks/commands/use-edit-mode-commands.js +++ b/packages/edit-site/src/hooks/commands/use-edit-mode-commands.js @@ -35,7 +35,7 @@ function useEditModeCommandLoader() { ? __( 'Delete template' ) : __( 'Delete template part' ); commands.push( { - name: label, + name: 'core/remove-template', label, icon: trash, context: 'site-editor-edit', @@ -55,7 +55,7 @@ function useEditModeCommandLoader() { ? __( 'Reset template' ) : __( 'Reset template part' ); commands.push( { - name: label, + name: 'core/reset-template', label, icon: backup, callback: ( { close } ) => {