Open carlos-zamora opened 3 years ago
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".
Maybe I was just high on adding args to everything because we could. I never considered if we should 😆
And the pendulum swings. :smile:
Option 2 sounds cool
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.
Will this change permit to set the default behavior of the "new" button as a duplicate/clone of the current tab?
So when clicking on "new", we could duplicate the current tab instead of using the "Duplicate" menu?
@Aymkdn This by itself - no. That we're tracking in #445.
Description of the new feature/enhancement
duplicateTab
andnewTab
are two different actions whereassplitPane
accomplishes the functionality of both "duplicate my current pane" and "open a new pane".splitPane
also lets the user useNewTerminalArgs
to customize a duplicate pane.I propose we do one of the following:
duplicateTab
:mode
arg tonewTab
. Possible values includeduplicateProfile
andduplicatePaneStructure
(see #4674). Default value isnull
.duplicateTab
still exists, but is just an alias fornewTab
withmode=duplicateProfile
.NewTerminalArgs
for free and creates a consistent design across actions creating new panes and new tabs.splitPane
intosplitPane
andduplicatePane
:duplicatePane
would have 2 args:size
andsplit
(same behavior as fromsplitPane
)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
docsnewTab
docssplitPane
docs