Scenario: The Command Palette #7466

Open
opened 2026-01-31 01:04:48 +00:00 by claunia · 4 comments
Owner

Originally created by @zadjii-msft on GitHub (Apr 17, 2020).

[Original issue: #2046] [Original Spec: #2193] [v2 Spec: #5674] [Spec Addendum 1: #6532]
TODO for initial PR
  • The list view items should be clickable
  • The list should be sorted by weight, then alphabetically
  • There should be stronger weighting for consecutive chars. Case in point: the sett example below
  • If you click on a list view item, focus enters the list view item, and then you can't hit enter to select it.
  • tests tests tests tests.
  • The auto gen names should probably only have the first letter capitalized - I bet if I do that I'll have to revert it during the PR... hmm...

v2.0 Follow-up work

Tasks

  • Don't localize command names on the command palette #7039
  • Add a setting to display Command Palette ActionMode entries in MRU order #6647
  • Add nested commands to the Command Palette #3994
  • Command palette entries should have optional icons #6644
  • A nested cmdpal menu should show the parent command above the list of commands #7265
  • Add support for commands iterable on color schemes #7329
  • Command Palette: Add support for commandline mode #6677
  • Make keys in the command palette look like actual keys, like in VS Code #6645
  • Command palette search results should bold the matching text #6646
  • commandPalette keybinding should close the palette when it's open #6679
  • Add "recent commands' to Command Palette in commandline mode #8296
  • Make the Command Line Mode easier to access #8322 (make a argument to toggleCommandPalette to go straight to the commandline mode)

Bugs

  • _compareCommandNames should use locale-aware string comparisons #6953 This is going to be done by #7039 actually.
  • Command Palette search algorithm needs to prioritize "longest substring" match, may need multiple passes #6693
  • #7911 [Screen Reader-Command Palette]-Narrator focus is not in sync while navigating using arrow keys in suggestion list after searching for any command.
  • #7907 [Screen Reader-Command Palette]:-Screen reader is not announcing the suggestions when user searches for the commands.
  • #13457 The "go back" button should pop only one layer of the stack, not go all the way back to the root (https://github.com/microsoft/terminal/pull/8051#issuecomment-722045813)
  • NewTab won't leave the Command Palette #7441
  • #7915 [Visual requirement-Command Palette]-Luminosity ratio is 4.046:1 which is less than 4.5:1 for the shortcut text appended to the Commands.
  • #7914 [Functional-Command Palette]- User is not able to perform action using shortcuts when command palette is open.
  • #7913 [Screen Reader-Command Palette]-Narrator focus moves separately onto the shortcut text which is appended to the command.
  • #7912 [Usable-Command Palette]-Keyboard shortcuts are not included in the sub menu of New Tab list item.
  • #7910 [Functional-Command Palette]- User is not able to move back from the New Tab sub menu as there is no functionality provided to move out of Sub menu.
  • #7908 [Screen Reader-Command Palette]-Screen reader user will not be able to identify the purpose of New Tab control if role and state are not appropriate.
  • Overlapping text in Command Palette submenu after deleting ">" #10140
  • Add an action that runs other actions (action chaining)? #5970
  • New icons for UI elements #6867
  • Add a shortcut action for switching to a specific color scheme #5401
  • Enable sending input to the Terminal with a keybinding #3799
  • Megathread: Sometimes, focus moves weirdly #6680
    • Launching "Find" from Command Palette doesn't focus the search box #6662

Backlog work

  • Consider refactoring CommandPalette + Switcher => LiveFilteringListView #7285
  • Allow commands with user-defined names to be hidden from cmdpal #7179
  • Add auto-suggestion to the Command-Palette wt arguments #7570
  • Code Health: Consider checking we are not in the opening state, by hooking both Opening and Open events
  • Code Health: The explicit implementation (in CommandPalette::_lostFocusHandler) can be generalized by checking if the focused element is a descendant of palette
  • Additional commands could be previewable #9818
  • Using --window in a wt action should do what you'd expect #10146
  • Allow binding keys to a nested action, to open the palette directly to it's children #10209
  • Keyboard text selection with Shift not working (#11026)
  • Keep the Command Palette around after executing a command #7011
  • Nested previewable commands don't "cancel" when you navigate up the nesting stack #10165
  • Preview what actions will be run in commandline mode of the CmdPal #8344
  • Provide realtime commandline parsing feedback in the commandline mode of the command palette #7284
  • Allow commands to be previewed in the command palette #6689
  • Random newline insterted with full screen applications (#11049)
Originally created by @zadjii-msft on GitHub (Apr 17, 2020). ##### [Original issue: #2046] [Original Spec: #2193] [v2 Spec: #5674] [Spec Addendum 1: #6532] <details> <summary>TODO for initial PR</summary> * [x] The list view items should be clickable * [x] The list should be sorted by weight, then _alphabetically_ * [x] There should be stronger weighting for consecutive chars. Case in point: the `sett` example below * [x] If you click on a list view item, focus enters the list view item, and then you can't hit enter to select it. * [x] tests tests tests tests. * [x] The auto gen names should probably only have the first letter capitalized - I bet if I do that I'll have to revert it during the PR... hmm... </details> ## v2.0 Follow-up work ### Tasks * [ ] Don't localize command names on the command palette #7039 * [ ] Add a setting to display Command Palette ActionMode entries in MRU order #6647 * [x] Add nested commands to the Command Palette #3994 * [x] Command palette entries should have optional icons #6644 * [x] A nested cmdpal menu should show the parent command above the list of commands #7265 * [x] Add support for commands iterable on color schemes #7329 * [x] Command Palette: Add support for commandline mode #6677 * [x] Make keys in the command palette look like actual keys, like in VS Code #6645 * [x] Command palette search results should bold the matching text #6646 * [x] `commandPalette` keybinding should close the palette when it's open #6679 * [x] Add "recent commands' to Command Palette in commandline mode #8296 * [x] Make the Command Line Mode easier to access #8322 (make a argument to `toggleCommandPalette` to go straight to the commandline mode) ### Bugs * [ ] ~`_compareCommandNames` should use locale-aware string comparisons #6953~ This is going to be done by #7039 actually. * [ ] Command Palette search algorithm needs to prioritize "longest substring" match, may need multiple passes #6693 * [ ] #7911 [Screen Reader-Command Palette]-Narrator focus is not in sync while navigating using arrow keys in suggestion list after searching for any command. * [x] #7907 [Screen Reader-Command Palette]:-Screen reader is not announcing the suggestions when user searches for the commands. * [x] #13457 The "go back" button should pop only one layer of the stack, not go all the way back to the root (https://github.com/microsoft/terminal/pull/8051#issuecomment-722045813) * [x] NewTab won't leave the Command Palette #7441 * [x] #7915 [Visual requirement-Command Palette]-Luminosity ratio is 4.046:1 which is less than 4.5:1 for the shortcut text appended to the Commands. * [x] #7914 [Functional-Command Palette]- User is not able to perform action using shortcuts when command palette is open. * [x] #7913 [Screen Reader-Command Palette]-Narrator focus moves separately onto the shortcut text which is appended to the command. * [x] #7912 [Usable-Command Palette]-Keyboard shortcuts are not included in the sub menu of New Tab list item. * [x] #7910 [Functional-Command Palette]- User is not able to move back from the New Tab sub menu as there is no functionality provided to move out of Sub menu. * [x] #7908 [Screen Reader-Command Palette]-Screen reader user will not be able to identify the purpose of New Tab control if role and state are not appropriate. * [x] Overlapping text in Command Palette submenu after deleting ">" #10140 ## Related, but indirectly * [x] Add an action that runs other actions (action chaining)? #5970 * [ ] New icons for UI elements #6867 * [x] Add a shortcut action for switching to a specific color scheme #5401 * [x] Enable sending input to the Terminal with a keybinding #3799 * [x] Megathread: Sometimes, focus moves weirdly #6680 - [x] Launching "Find" from Command Palette doesn't focus the search box #6662 ## Backlog work * [ ] Consider refactoring CommandPalette + Switcher => LiveFilteringListView #7285 * [ ] Allow commands with user-defined names to be hidden from cmdpal #7179 * [ ] Add auto-suggestion to the Command-Palette wt arguments #7570 * [ ] Code Health: Consider checking we are not in the opening state, by hooking both `Opening` and `Open` events * [ ] Code Health: The explicit implementation (in `CommandPalette::_lostFocusHandler`) can be generalized by checking if the focused element is a descendant of palette * [ ] Additional commands could be previewable #9818 * [ ] Using --window in a wt action should do what you'd expect #10146 * [ ] Allow binding keys to a nested action, to open the palette directly to it's children #10209 * [x] #11026 * [ ] ~Keep the Command Palette around after executing a command #7011~ * [x] Nested previewable commands don't "cancel" when you navigate up the nesting stack #10165 * [x] Preview what actions will be run in commandline mode of the CmdPal #8344 * [x] Provide realtime commandline parsing feedback in the commandline mode of the command palette #7284 * [x] Allow commands to be previewed in the command palette #6689 * [x] #11049
claunia added the Product-TerminalArea-UserInterfaceIssue-ScenarioArea-CmdPal labels 2026-01-31 01:04:48 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 19, 2020):

Alright, so lets get some teaser images of what's in progress:

MicrosoftTeams-image (8)
MicrosoftTeams-image (7)
MicrosoftTeams-image (6)
MicrosoftTeams-image (5)

This is including the spec changes in review over in #6532.

There's also a shadow on the dialog that the snipping tool is conveniently leaving out.

@zadjii-msft commented on GitHub (Jun 19, 2020): Alright, so lets get some teaser images of what's in progress: ![MicrosoftTeams-image (8)](https://user-images.githubusercontent.com/18356694/85182332-fc19da00-b24d-11ea-8fc1-ac8ef338f854.png) ![MicrosoftTeams-image (7)](https://user-images.githubusercontent.com/18356694/85182334-fcb27080-b24d-11ea-846f-a30e55a4809d.png) ![MicrosoftTeams-image (6)](https://user-images.githubusercontent.com/18356694/85182335-fd4b0700-b24d-11ea-849b-fc28a9c5b9cd.png) ![MicrosoftTeams-image (5)](https://user-images.githubusercontent.com/18356694/85182336-fd4b0700-b24d-11ea-9386-6faae860243a.png) This is including the spec changes in review over in #6532. There's also a shadow on the dialog that the snipping tool is conveniently leaving out.
Author
Owner

@Don-Vito commented on GitHub (Nov 16, 2020):

@zadjii-msft - is there a plan to add a lazy loading for command palette. From my startup profiling, the load adds more than 0.5 sec on startup?

@Don-Vito commented on GitHub (Nov 16, 2020): @zadjii-msft - is there a plan to add a lazy loading for command palette. From my startup profiling, the load adds more than 0.5 sec on startup?
Author
Owner

@zadjii-msft commented on GitHub (Nov 18, 2020):

Not at the moment, but .5s is pretty bad 😬 Maybe we should be! Presumably, we don't need to expand iterable commands before displaying the UI, so that could be done on a background thread, and if the user does super quickly open the cmdpal, then we could wait for that background job to complete. Iterable commands won't have a keybinding set on them, so I'm not worried about that so much.

Out of curiosity, how are you profiling the startup? Are there any other hot paths in our startup that stand out? (Might be best to start a new thread for that discussion though)

@zadjii-msft commented on GitHub (Nov 18, 2020): Not at the moment, but .5s is pretty bad 😬 Maybe we should be! Presumably, we don't need to expand iterable commands before displaying the UI, so that could be done on a background thread, and if the user does _super quickly_ open the cmdpal, then we could wait for that background job to complete. Iterable commands won't have a keybinding set on them, so I'm not worried about that so much. Out of curiosity, how are you profiling the startup? Are there any other hot paths in our startup that stand out? (Might be best to start a new thread for that discussion though)
Author
Owner

@Don-Vito commented on GitHub (Nov 18, 2020):

Not at the moment, but .5s is pretty bad 😬 Maybe we should be! Presumably, we don't need to expand iterable commands before displaying the UI, so that could be done on a background thread, and if the user does super quickly open the cmdpal, then we could wait for that background job to complete. Iterable commands won't have a keybinding set on them, so I'm not worried about that so much.

Out of curiosity, how are you profiling the startup? Are there any other hot paths in our startup that stand out? (Might be best to start a new thread for that discussion though)

I am using intel's vtune profiler both in usual and kernel events modes.
image

@Don-Vito commented on GitHub (Nov 18, 2020): > > > Not at the moment, but .5s is pretty bad 😬 Maybe we should be! Presumably, we don't need to expand iterable commands before displaying the UI, so that could be done on a background thread, and if the user does _super quickly_ open the cmdpal, then we could wait for that background job to complete. Iterable commands won't have a keybinding set on them, so I'm not worried about that so much. > > Out of curiosity, how are you profiling the startup? Are there any other hot paths in our startup that stand out? (Might be best to start a new thread for that discussion though) I am using intel's vtune profiler both in usual and kernel events modes. ![image](https://user-images.githubusercontent.com/4639110/99543461-e0ad2980-29bb-11eb-9aee-47d82fb36aab.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7466