Skip to content

Commit

Permalink
Display command palette keyboard shortcut in tooltip when hovering/fo…
Browse files Browse the repository at this point in the history
…cusing icon button (#52841)
  • Loading branch information
jameskoster authored Jul 24, 2023
1 parent 1afe0ea commit f41c8ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/edit-site/src/components/site-hub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { decodeEntities } from '@wordpress/html-entities';
import { forwardRef } from '@wordpress/element';
import { search, external } from '@wordpress/icons';
import { store as commandsStore } from '@wordpress/commands';
import { displayShortcut } from '@wordpress/keycodes';

/**
* Internal dependencies
Expand Down Expand Up @@ -192,6 +193,7 @@ const SiteHub = forwardRef( ( { isTransparent, ...restProps }, ref ) => {
icon={ search }
onClick={ () => openCommandCenter() }
label={ __( 'Open command palette' ) }
shortcut={ displayShortcut.primary( 'k' ) }
/>
) }
</HStack>
Expand Down

1 comment on commit f41c8ea

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in f41c8ea.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5647786176
📝 Reported issues:

Please sign in to comment.