Skip to content

Add top-level nested commands #7174

Closed

Description

I'm filing this one to get team feedback for what commands we should include in the defaults once #6856 lands. I'm gonna throw the usual suspects on the Assigned To line, and remove yourself when you've shared thoughts


Shouldn't we replace the "newTab" and "splitPane" entries here with nested/iterable commands?

I was thinking, something neat would be to make the tree look like this:

<Command Palette>
└─ Open Profile...
   ├─ Profile 1...
   |  ├─ New Tab
   |  ├─ Split Automatically
   |  ├─ Split Vertically
   |  └─ Split Horizontally
   ├─ Profile 2...
   |  ├─ New Tab
   |  ├─ Split Automatically
   |  ├─ Split Vertically
   |  └─ Split Horizontally
   └─ Profile 3...
      ├─ New Tab
      ├─ Split Automatically
      ├─ Split Vertically
      └─ Split Horizontally

_Originally posted by Carlos Zamora (@carlos-zamora) in #6856


Yea, that's what I was thinking too, but I think I wanted to open a broader discussion with the team for what these commands should be. I was thinking that there's be two top-level ones (Split pane... and New Tab...), but I want a team consensus on those.


In my head, this is how I pictured it:

  {
    "name": "New tab...",
    "commands": [
      {
        "iterateOn": "profiles",
        "icon": "${profile.icon}",
        "name": "${profile.name}",
        "command": { "action": "newTab", "profile": "${profile.name}" }
      }
    ]
  },
  {
    "name": "Split pane...",
    "commands": [
      {
        "iterateOn": "profiles",
        "icon": "${profile.icon}",
        "name": "${profile.name}...",
        "commands": [
          {
            "name": "Split automatically",
            "command": { "action": "splitPane", "profile": "${profile.name}", "split": "automatic" }
          },
          {
            "name": "Split vertically",
            "command": { "action": "splitPane", "profile": "${profile.name}", "split": "vertical" }
          },
          {
            "name": "Split horizontally",
            "command": { "action": "splitPane", "profile": "${profile.name}", "split": "horizontal" }
          }
        ]
      }
    ]
  }

Which then would evaluate to

<Command Palette>
├─ New tab...
|  ├─ Profile 1
|  ├─ Profile 2
|  └─ Profile 3
└─ Split pane...
   ├─ Profile 1...
   |  ├─ Split Automatically
   |  ├─ Split Vertically
   |  └─ Split Horizontally
   ├─ Profile 2...
   |  ├─ Split Automatically
   |  ├─ Split Vertically
   |  └─ Split Horizontally
   └─ Profile 3...
      ├─ Split Automatically
      ├─ Split Vertically
      └─ Split Horizontally

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Aug 4, 2020
  2. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Aug 4, 2020
  3. cinnamon-msft commented on Aug 18, 2020

    @cinnamon-msft
    Contributor

    I prefer the layout of option 2. However, I could see a use case for people searching for a specific profile and the default behavior would be to open a new tab.

  4. leonMSFT commented on Aug 18, 2020

    @leonMSFT
    Contributor

    I like 2 better as well, its layout seems more logical to me. IMO I feel like if I wanted to open a New Tab or Split Pane (with a specific profile or not), I'd look through the cmdpal for those commands verbatim instead of looking for Open Profile.

    In addition to the nested New Tab and Split Pane, I'd still like to leave in a non-nested version of New Tab and Split Pane that do their default behaviors for quick one-shot enter keypresses instead of double/triple keypress to navigate through the nested versions.

  5. removed their assignment
    on Aug 18, 2020
  6. zadjii-msft commented on Aug 19, 2020

    @zadjii-msft
    MemberAuthor

    Alright well that's enough consensus for me to go on. I'll ship a PR for option 2, and we'll finish discussion in the PR. Thanks guys!

  7. ghost added
    In-PRThis issue has a related PR
    on Aug 19, 2020
  8. ghost closed this as completedin #7348on Aug 21, 2020
  9. ghost added a commit that references this issue on Aug 21, 2020
    64e3c84
  10. ghost removed
    In-PRThis issue has a related PR
    on Aug 21, 2020
  11. ghost added
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    on Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-SettingsIssues related to settings and customizability, for console or terminalIssue-QuestionFor questions or discussionProduct-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions