-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Command Center: Quick search for jumping to other pages or templates in the editor. #48457
Comments
I would love this! Some sort of Spotlight/Raycast functionality. |
@annezazu Linked me to this. I'm the author of https://wordpress.org/plugins/turbo-admin/ and a huge proponent of command palettes and keyboard navigation. I'd like to link some other prior art and resources that may be useful:
Some thoughts/experiences from me:
Hope that's useful. I very much support this idea and would love to stay involved in whatever ways I can, even though I'm doing myself out of a job!! :-) |
Other things:
|
@rosswintle thanks for chiming in and the offer to collaborate! kbar was definitely on my mind. I also quite like cmdk.paco.me. @richtabor also has some prior art within the WP dashboard. The editor focus is just a step in the direction, the hope is to have something that expands beyond and would be part of a more global search, not just invoked via keyboard shortcuts. |
I would definitely like to make it pluggable so that plugins can enhance it with cloud-based functionality. Imagine this: it submits the AST of the current editor contents to a service, and can receive back a series of transformations that can be applied to the current document (these could be the same transformations we use to do collaborative editing, which I assume someone's looking at). Those transformations can be applied to the current document in a reversible way. So you can say "align the banner image to the right" and then get back a transformation that does that, and if you don't like it you can reject the change. In the simplest case, of course, the transformation might just search for and insert a block (which can be accomplished without any fancy cloud stuff) but doing it this way makes it infinitely extensible. |
One thing to watch for is that this keybinding is already being used in Gutenberg to create links. |
I had previously explored a command palette for navigating WordPress, commanding the editor, and conducting common actions—such as adding posts and pages. Adding context was very helpful, allowing some commands to only be available when requirements were met (i.e. commands for controlling the block editor, only available within the editor). But then other commands, like adding a post, or searching for a post to edit/open, would be available anywhere. |
As the initial implementation is getting close to land in #49330 I've updated the issue and add a todo list to keep track of potential follow-up work. |
The initial PR has landed behind a feature flag, we'll be following up with design updates... If you want to help, there's a todo list attached to this issue. |
We're making some good progress here: The command center is now implemented behind an experimental flag, The next steps are going to be around "contextual commands" for the command center. |
Status update here: We now have the contextual commands API and the command center is not experimental anymore in the Gutenberg Plugin. We don't have yet all the commands we hope to include but we're iterating on these in #50407 Should we close this issue maybe? |
I was just about to ask, since all the boxes are checked. Nice work! |
Let's close and monitor must have pending items separately. |
This can be seen as a start on an extensible command & quick search component that can be used for way-finding (go to About page; edit Archive template) and running commands (toggle top toolbar; etc). The first milestone is to power quick search for content and templates within the site editor.
Contextual Behaviours
To do: map actions based on context and state (i.e. published page should include view link, edit url, recent pages; template should include duplicate, recent templates / related templates). Related Figma doc.
The text was updated successfully, but these errors were encountered: