Skip to content
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

Add block-specific commands as contextual suggestions #53539

Closed
richtabor opened this issue Aug 10, 2023 · 1 comment · Fixed by #53974
Closed

Add block-specific commands as contextual suggestions #53539

richtabor opened this issue Aug 10, 2023 · 1 comment · Fixed by #53974
Labels
[Package] Commands /packages/commands [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

We currently have suggested commands based on context. Like if you're viewing a page in the site editor, you'll see a contextual command to edit the template before searching for commands.

It would be nice to bring some of the new block-specific commands added in #52509 front and center, if you're opening the command palette with a block selected. I don't think we need all the commands, but the more editing-forward commands perhaps.

Example of contextual suggestion when editing a template:

CleanShot 2023-08-10 at 14 54 56

Visual:

block-specific-commands
@jrtashjian
Copy link
Contributor

I've pushed up #53974 which accomplishes this by applying a new context for the command palette.

draganescu pushed a commit that referenced this issue Oct 13, 2023
* Add new command palette context for block selection

* Take advantage of useCommand in edit-post like edit-site

* Apply new context to blockActions commands

* Remove duplicate useCommands call.

* reorder block commands

* Split contextual commands into a "QuickActions" hook.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Commands /packages/commands [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants