Skip to content

CmdPal: Add settings, alias, and hotkey actions to top-level context menus#46049

Open
jiripolasek wants to merge 4 commits intomainfrom
dev/jpolasek/f/cmdpal-add-tlm-contexual-items
Open

CmdPal: Add settings, alias, and hotkey actions to top-level context menus#46049
jiripolasek wants to merge 4 commits intomainfrom
dev/jpolasek/f/cmdpal-add-tlm-contexual-items

Conversation

@jiripolasek
Copy link
Copy Markdown
Collaborator

@jiripolasek jiripolasek commented Mar 10, 2026

Summary of the Pull Request

  • Automatically add a Settings menu item for extensions that expose a settings page
  • Replace provider-authored settings-page context menu items so they open the Settings window instead (based on [CmdPal] Open settings in Settings #46047)
  • Add Change alias and Change global hotkey actions to top-level command context menus
  • Navigate directly to the owning extension page and focus the relevant settings section or command control
  • Group the new settings-related actions into a separate context menu section and update their icons

Pictures? Pictures!

Screen.Recording.2026-03-10.182002.mp4

PR Checklist

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

- Automatically add a Settings menu item for extensions that expose a settings page
- Replace provider-authored settings-page context menu items so they open the Settings window instead
- Add Change alias and Change global hotkey actions to top-level command context menus
- Navigate directly to the owning extension page and focus the relevant settings section or command control
- Group the new settings-related actions into a separate context menu section and update their icons

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
@jiripolasek jiripolasek requested a review from niels9001 March 10, 2026 17:41
@jiripolasek jiripolasek self-assigned this Mar 10, 2026
@jiripolasek jiripolasek added the Product-Command Palette Refers to the Command Palette utility label Mar 10, 2026
@niels9001 niels9001 mentioned this pull request Mar 10, 2026
11 tasks
@zadjii-msft zadjii-msft added the Don't merge - Hold for release Hold off on merging this PR, even if it's approved. label Mar 10, 2026
@michaeljolley michaeljolley added Merge conflict 🙀 and removed Don't merge - Hold for release Hold off on merging this PR, even if it's approved. labels Mar 27, 2026
@jiripolasek jiripolasek added Needs-Review This Pull Request awaits the review of a maintainer. and removed Merge conflict 🙀 labels Mar 28, 2026
@jiripolasek jiripolasek removed the Needs-Review This Pull Request awaits the review of a maintainer. label Mar 30, 2026
@jiripolasek jiripolasek marked this pull request as draft March 30, 2026 01:03
@michaeljolley
Copy link
Copy Markdown
Contributor

I love the settings stuff. On alias/hotkey, it starts to get pretty bloated. I could see "Change Alias/Hotkey", but really, settings takes them there.

@jiripolasek
Copy link
Copy Markdown
Collaborator Author

I love the settings stuff. On alias/hotkey, it starts to get pretty bloated. I could see "Change Alias/Hotkey", but really, settings takes them there.

a) This helps with discoverability. I know it’s there, you know it’s there, but users don’t. Even if they open the Settings page, shortcuts and aliases are hidden in a collapsed expander.

b) As currently implemented, the "Settings" command only appears for custom extension settings (the adaptive card content) and takes you there. Not all extensions have that. It could be changed to "just" open the Extension Settings page, but that would lose part of its appeal: if the menu item is present, there’s something useful to configure.

@jiripolasek jiripolasek marked this pull request as ready for review March 30, 2026 11:15
@jiripolasek jiripolasek added the Needs-Review This Pull Request awaits the review of a maintainer. label Mar 30, 2026
@michaeljolley michaeljolley enabled auto-merge (squash) March 30, 2026 15:46
@michaeljolley
Copy link
Copy Markdown
Contributor

I just worry about that context menu becoming like the context menu in Windows.
image

@michaeljolley
Copy link
Copy Markdown
Contributor

@niels9001, would love your input here

@michaeljolley
Copy link
Copy Markdown
Contributor

Pinging @niels9001

@niels9001
Copy link
Copy Markdown
Collaborator

@jiripolasek @michaeljolley I believe we are using a ListView instead of a MenuFlyout for this, right - because the latter doesn't support binding an ItemsSource 😢?

Because then, we could just have a single entry that is something called 'customization' and we could do a sub flyout?

image

@michaeljolley
Copy link
Copy Markdown
Contributor

@jiripolasek @michaeljolley I believe we are using a ListView instead of a MenuFlyout for this, right - because the latter doesn't support binding an ItemsSource 😢?

Because then, we could just have a single entry that is something called 'customization' and we could do a sub flyout?

It's using our built-in context-menu component. That is a ListView. However, it behaves just like our standard ContextMenu in that selecting a command that has subcommands simply dives into those subcommands rather than opening another flyout.

image

@niels9001
Copy link
Copy Markdown
Collaborator

@jiripolasek @michaeljolley I believe we are using a ListView instead of a MenuFlyout for this, right - because the latter doesn't support binding an ItemsSource 😢?

Because then, we could just have a single entry that is something called 'customization' and we could do a sub flyout?

It's using our built-in context-menu component. That is a ListView. However, it behaves just like our standard ContextMenu in that selecting a command that has subcommands simply dives into those subcommands rather than opening another flyout.

image

Right.. so for this example, should all of these be grouped under a Copy context menu?

I think that would make sense in e.g. an app or OS UX, for a launcher I dunno.. question stays that you'd want to differentiate between primirary actions and secomdary actions.

E.g. in the OP changing the alias is a one time thing - and a user would not need direct access to it so a submenu could make sense there - actually reduces cognitive load and improves glancibility too by hiding / keeping things short and clean.

@jiripolasek
Copy link
Copy Markdown
Collaborator Author

If we do this, we should find another way to teach the user about the hotkeys and aliases. Moving them out of sight will greatly reduce discoveribility. But then, it might have been a wrong too for a wrong problem altogether.

@jiripolasek
Copy link
Copy Markdown
Collaborator Author

@niels9001 would you like the new "Customize" submenu encompass Settings also?

The only thing I'm not sure is how it behaves when the Customize (or any submenu) becomed the secondary command (Ctrl+Enter).

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

Labels

Needs-Review This Pull Request awaits the review of a maintainer. Product-Command Palette Refers to the Command Palette utility

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants