microsoft / microsoft/terminal

Epic: Introduce Actions page to the Settings UI

Open
#6,900 3 comments 0 reactions 1 assignee View on GitHub

@carlos-zamora is already working on this.

Since Mar 10, 2021.

Area-SettingsUI Issue-Scenario Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

written and maintained by @carlos-zamora

Description

A largely missing part of the Settings UI is actions. This will allow the user to customize their command palette and key bindings without the need to go into the JSON.

Much like the implementation plan for the Settings UI, there are many moving pieces to this that are outside of the TerminalSettingsEditor project:

  • #8100: Inheritance for actions
    • enables ability to track where an action came from
    • PR #9621
  • serialization for actions
    • step 1: general serialization
    • step 2: only serialize meaningful changes into settings.json (don't serialize the whole thing)
    • PR #9926
  • Design Settings UI representation
    • PR #9427
  • Implement proposed design
    • Foundation (PR #9949)
      • delete a key binding
      • set the key chord for a key binding
      • miscellaneous work (i.e. keyboard navigation, accessibility, etc...)
    • Set Action
      • change the action for a key binding (PR #10220)
      • add a new key binding (PR #10550)

Some follow-up work items:

  • Key chord editor/listener
    • Instead of parsing key chord text, it'd be nice if we could listen for key chords.
    • Inspiration: We should take a look at how PowerToys got around this problem.
    • Inspiration: An old version of SUI also had this implemented (back during the hackathon).
    • PR #10652
  • "the unbound bug"
    • Edit switchToTab to win+shift+q. Save. Edit switchToTab to ctrl+shift+t.
    • "unbound": "win+shift+q" appears but doesn't need to exist.
  • Actions::_GetContainerIndexByKeyChord optimization
    • We're just doing a O(n) search for a matching key chord, but we could technically do this much faster.
    • The list is already sorted by command name, so if we...
      1. use GetActionByKeyChord() to get the Command
      2. perform a binary search on the list using Command::Name() (assuming it has a name)
    • we should be able to accomplish this search in O(log n) time (usually)'
  • Performance
    • Clicking Actions in the left bar of Settings takes about 3 seconds to load and doesn't cache/keep it
  • #11341

Bugs:

  • Settings Model:
    • #10365: not serializing top-level "iterateOn" commands! (PR #10373)
    • GetKeyBindingForAction doesn't always find the given action (PR #10341)
  • Settings UI:
    • #10406: Edit button on actions page is invisible with light theme

References

#7175 should be kept in mind during this design.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.