Skip to content

Command Palette: Mapping Contextual Commands #50407

Open

Description

@richtabor

Tentative mapping out of contextual commands for the Command Center.

These are commands that should be suggested and prioritized when the Command Center is invoked from specific flows (currently within the Site Editor). There are likely more to bake in, but these will help us build it out.

If you have ideas for more, do share them.

Site Editor

Command Requirement Suggested Action
Open Styles N/A Yes Opens the Global Styles panel
Open Templates N/A Yes Opens the Site View > Template sidebar
Open Library N/A Yes Opens the Site View > Template Parts sidebar
Open Style Book N/A No Opens the Global Styles panel, Activates Style Book, Closes List View
Open Style Variations N/A No Opens Site View > Styles sidebar (or Styles sidebar in the Inspector). Also consider re-naming to "Style Variations", as Open and Browse styles isn't great.
Add custom CSS N/A No Opens Styles sidebar with the CSS panel available.

Editing a template

Command Requirement Suggested Action
Manage templates N/A Yes Opens the Manage Templates view
Edit header Has header template part Yes Opens the template's Header in isolated template mode
Edit footer Has footer template part Yes Opens the template's Footer in isolated template mode
Delete template Is a custom template Yes Moves the currently viewed template to the trash
Replace template N/A Yes Opens the template pattern selection modal that currently renders when adding a new template
Clear customizations Yes Customizations are present and is not a custom template Resets the template to the default state

Editing a template part

Command Requirement Suggested Action
Manage template parts N/A Yes Opens the Manage Templates Parts view
Replace template part N/A Yes Opens the template part replace modal
Clear customizations Customizations are present Yes Resets the template part to the default state

Editing a postType

Command Requirement Suggested Action
Preview postType N/A Yes Opens the preview link in a new tab
Publish postType postType is not published Yes Publishes the postType
Save postType postType has unsaved changes Yes Saves changes
Delete postType postType is a draft, or published state Yes Moves postType to trash
Duplicate postType postType is a draft, or published state Yes postType is duplicated as a draft
Add new postType N/A Yes Opens Add New modal #48456

Editing a category template

Command Requirement Suggested Action
Manage categories N/A Yes Opens the /edit-tags.php?taxonomy=category view

cc @youknowriad @WordPress/gutenberg-design

Activity

  1. richtabor commented on May 5, 2023

    @richtabor
    MemberAuthor

    A WIP, and some may not be entirely possible just yet. Let's riff on these to get going.

  2. added
    [Type] Tracking Issue
    [Feature] Site Editor
    on May 5, 2023
  3. jameskoster commented on May 5, 2023

    @jameskoster
    Contributor

    Nice, this looks like a great start.

    • Editing a template part could have the same Replace command as editing a template.
    • If we're to include category management as suggested in Details View → Templates #49597, should we mock up a list for Editing a taxonomy term?
    • I guess they're not included here as they're not strictly commands, but I assume we'll have a small 'Recently edited' list in each panel?
  4. moved this to Needs feedback in 6.3 Designon May 5, 2023
  5. richtabor commented on May 5, 2023

    @richtabor
    MemberAuthor

    Editing a template part could have the same Replace command as editing a template.

    ✅

    If we're to include category management as suggested in #49597, should we mock up a list for Editing a taxonomy term?

    Good idea. I'll add one for "Manage categories" and another for "Add new category template".

    I guess they're not included here as they're not strictly commands, but I assume we'll have a small 'Recently edited' list in each panel?

    I wanted to focus on the actual commands this go around, but recent "context" will be good.

  6. richtabor commented on May 5, 2023

    @richtabor
    MemberAuthor

    @youknowriad Do we have sub-commands yet, or was that still up in the air?

    Example:
    CleanShot 2023-05-05 at 18 32 51

  7. ramonjd commented on May 8, 2023

    @ramonjd
    Member

    🤞 We can add a command for Global styles revisions for the site editor soon!

  8. youknowriad commented on May 8, 2023

    @youknowriad
    Contributor

    @richtabor We don't have sub commands yet.


    Also, I'd like some clarifications about how the "contextual commands" work. For instance:

    • when editing a "template", I'm also within the "site editor", do I show both the contextual commands for template and site editor?
    • when I'm editing a template part, I can be within edit template and within the site editor as well...

    I'd love also to get some designs/mockups about how these contextual commands should look.

  9. moved this from Needs feedback to Needs dev in 6.3 Designon May 8, 2023
  10. jasmussen commented on May 8, 2023

    @jasmussen
    Contributor

    when editing a "template", I'm also within the "site editor", do I show both the contextual commands for template and site editor?

    This one could depend on #49980. That is, if you are in the site editor, but in the "page editing" portion, you can show one set of commands, whereas inside the template editing "mode", you'd show the others.

    when I'm editing a template part, I can be within edit template and within the site editor as well...

    Can we be aware of what's selected in the canvas?

    My instinct when thinking of contextuality, it's related either to what is selected, or what mode you are in. So Site editor > select header > edit header in focus mode — the last two steps, or at least the last step, could be the context that defines the suggestions.

    CC: @richtabor in case you have clarification or mockups going over this.

  11. youknowriad commented on May 8, 2023

    @youknowriad
    Contributor

    My question is about when we have more than one context, do we accumulate the contextual commands or do we force the command center to only show one context at time (the more focused I guess)

  12. moved this from Needs dev to Needs design, or refresh in 6.3 Designon May 8, 2023
  13. jasmussen commented on May 8, 2023

    @jasmussen
    Contributor

    My instinct would also be that we always replace the suggestions with the most focused context.

  14. 8 remaining items

  15. richtabor commented on May 23, 2023

    @richtabor
    MemberAuthor

    the palette is going to get quite large

    I think it's fine to have loads of commands; I'd rather you search for header and see a command to edit the header, than search for it and not find something.

    But we need to be cognizant of the commands that are suggested contextually.

  16. jameskoster commented on May 23, 2023

    @jameskoster
    Contributor

    Sorry I'm not getting my question across properly :)

    But we need to be cognizant of the commands that are suggested contextually.

    That is what I am talking about. In #50832, an "Edit..." suggestion is included for each template part in the template you're already editing. The question is about how useful this is, given you can already click directly on the template part on the canvas, or select it via list view. It doesn't seem all that helpful to me, and adds quite a lot of noise to the suggestions.

    I agree these commands should appear on search.

  17. jameskoster commented on May 24, 2023

    @jameskoster
    Contributor

    For custom templates / parts, it might be good to include a Rename command.

  18. annezazu commented on Jun 2, 2023

    @annezazu
    Contributor

    Dropping this bug here as work progresses: #51204

  19. jameskoster commented on Jun 8, 2023

    @jameskoster
    Contributor

    When editing a post or page, we might consider a "Swap template" command which would surface all $custom templates in a modal. Related: #51347

  20. annezazu commented on Jun 29, 2023

    @annezazu
    Contributor

    Passing on some feedback from the FSE Outreach Program's latest call for testing:

    When I search the new reusable block in the Command center, I didn’t find. The new footer template, yes.

    In particular, it is odd that you can search for template parts, including custom ones, but not general patterns. As patterns take center stage with the Pattern section, I think we should consider adding this.

  21. jameskoster commented on Jul 12, 2023

    @jameskoster
    Contributor

    Another consideration for "Editing a postType": direct access to revisions.

  22. jameskoster commented on Aug 17, 2023

    @jameskoster
    Contributor

    Should we surface management actions in site editor sections? IE in Templates you'd see "Add new template", "Manage all templates"? Same for Pages, Patterns, etc.

  23. changed the title [-]Command Center: Mapping Contextual Commands[/-] [+]Command Palette: Mapping Contextual Commands[/+] on Aug 24, 2023
  24. annezazu commented on Aug 24, 2023

    @annezazu
    Contributor

    As part of the twenty fifth call for testing, adding a command to open list view was suggested, along with a few other ideas:

    This also went generally well, but the List View wasn’t showing as an option to open on the Command Palette. Also, maybe something relevant would be the option to search a block name and edit its styles globally (not sure if maybe this was expected to show up as well).

    Another suggestion to add List View in:

    Toggling the list view from the Editor using the Command palette doesn’t work yet. I’d love to have the same advanced functions everywhere.

  25. JosVelasco commented on May 30, 2024

    @JosVelasco
    Contributor

    I'd love to have a command to open/expand a block's advanced panel settings. It makes sense to open advanced options easily with a command or at least make it available to search for.

  26. jasmussen commented on Jul 3, 2024

    @jasmussen
    Contributor

    A good place to start on this one might be to show the current context. We're already showing initial commands based on this context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Site Editor[Package] Commands[Type] Tracking Issue

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions