microsoft / microsoft/terminal

Replace `duplicateTab` with `newTab` with arg

Open
#9,957 6 comments 0 reactions 1 assignee Claimed by @carlos-zamora View on GitHub
Area-Settings Issue-Task Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

# 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 #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](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#duplicate-tab)
[`newTab` docs](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#new-tab)
[`splitPane` docs](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#split-a-pane)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.