Toolbar command palette: icon link#11160
Toolbar command palette: icon link#11160sabernhardt wants to merge 13 commits intoWordPress:trunkfrom
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
sabernhardt
left a comment
There was a problem hiding this comment.
As @westonruter suggested on the ticket, this uses the search icon in an element to open the command palette dialog.
At 31 pixels wide, it could start to break the top level, but it is not as demanding as trying to fit a fake search box that opens a real search field further down the page.
| add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_item', 9991 ); | ||
| add_action( 'admin_bar_menu', 'wp_admin_bar_recovery_mode_menu', 9992 ); | ||
| add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 9999 ); | ||
| add_action( 'admin_bar_menu', 'wp_admin_bar_command_palette_menu', 9999 ); |
There was a problem hiding this comment.
This is separate from the Search node in case someone wants to disable one and keep the other, but it is set at the same priority.
|
As per this comment, this would also enable the Command Palette to be made available to mobile form factors. |
|
I added a screengrab to the description. Also, suggested patch to show the search icon on mobile: --- a/src/wp-includes/css/admin-bar.css
+++ b/src/wp-includes/css/admin-bar.css
@@ -1031,7 +1031,8 @@ html:lang(he-il) .rtl #wpadminbar * {
#wpadminbar li#wp-admin-bar-new-content,
#wpadminbar li#wp-admin-bar-edit,
#wpadminbar li#wp-admin-bar-comments,
- #wpadminbar li#wp-admin-bar-my-account {
+ #wpadminbar li#wp-admin-bar-my-account,
+ #wpadminbar li#wp-admin-bar-command-palette {
display: block;
} |
|
It would be nice to promote the ⌘K/^K shortcut somehow as well so a user can learn they don't have to actually click on 🔍 to open the Command Palette. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Here's a couple screen recordings with the latest changes: DesktopScreen.Recording.2026-03-05.at.09.24.07.movMobileScreen.Recording.2026-03-05.at.09.22.35.mov |
Adds a node to the admin toolbar to open the Command Palette. It uses the same magnifying glass icon from the Search form, in the same place.
Trac 64672
Use of AI Tools: None (by me)
Screengrab
Screen.Recording.2026-03-04.at.16.21.25.mov
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.