Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace duplicateTab with newTab with arg #9957

Open
carlos-zamora opened this issue Apr 26, 2021 · 6 comments
Open

Replace duplicateTab with newTab with arg #9957

carlos-zamora opened this issue Apr 26, 2021 · 6 comments
Assignees
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@carlos-zamora
Copy link
Member

Description of the new feature/enhancement

duplicateTab and newTab are two different actions whereas splitPane accomplishes the functionality of both "duplicate my current pane" and "open a new pane". splitPane also lets the user use NewTerminalArgs to customize a duplicate pane.

I propose we do one of the following:

  1. Deprecate duplicateTab:
    • add a mode arg to newTab. Possible values include duplicateProfile and duplicatePaneStructure (see Duplicate Tab doesn't duplicate split panes #4674). Default value is null.
    • duplicateTab still exists, but is just an alias for newTab with mode=duplicateProfile.
    • This gives us NewTerminalArgs for free and creates a consistent design across actions creating new panes and new tabs.
  2. Split splitPane into splitPane and duplicatePane:
    • duplicatePane would have 2 args: size and split (same behavior as from splitPane)
    • This provides a consistent design, but I feel that it doesn't provide adequate NewTerminalArgs benefits.

Other comments

Inspired by a comment made by @lhecker
#4674 Should be kept in mind with the new design.
I'm open to other ideas or different names for these actions/args.

Resources

duplicateTab docs
newTab docs
splitPane docs

@carlos-zamora carlos-zamora added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. labels Apr 26, 2021
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Apr 26, 2021
@zadjii-msft
Copy link
Member

gods I hate this. I already deeply regret making "duplicate pane" an argument to splitPane instead of a separate action. I'm not sure there's anyone using "duplicate pane, but also I want x, y, and z to actually have the values foo, bar, baz". It means that there's this long, verbose action just for duplicate pane, and that's annoying. duplicatePane would have just been easier. Maybe I was just high on adding args to everything because we could. I never considered if we should 😆

I'd definitely prefer the second option, the "make a duplicatePane action" route. We can still throw args in duplicateTab for "duplicatePaneStructure: bool".

@DHowett
Copy link
Member

DHowett commented Apr 26, 2021

Maybe I was just high on adding args to everything because we could. I never considered if we should 😆

And the pendulum swings. 😄

@zadjii-msft
Copy link
Member

Option 2 sounds cool

@zadjii-msft zadjii-msft added Issue-Task It's a feature request, but it doesn't really need a major design. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 29, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Apr 29, 2021
@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
@carlos-zamora
Copy link
Member Author

carlos-zamora commented Nov 7, 2022

We've decided on option 1. Mainly because of #10232, #12985, and #14350.

We need to add duplicate: {true|false} to NewTerminalArgs, and make sure that new tab, new window code knows how to handle this.

We can promote that to an enum when we get to #4674.

@carlos-zamora carlos-zamora modified the milestones: Backlog, Terminal v1.18 Nov 7, 2022
@carlos-zamora carlos-zamora self-assigned this Nov 7, 2022
@Aymkdn
Copy link

Aymkdn commented Jan 3, 2023

Will this change permit to set the default behavior of the "new" button as a duplicate/clone of the current tab?
image

So when clicking on "new", we could duplicate the current tab instead of using the "Duplicate" menu?
image

@zadjii-msft
Copy link
Member

@Aymkdn This by itself - no. That we're tracking in #445.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

4 participants