Split Pane via a context menu #7014

Closed
opened 2026-01-31 00:52:55 +00:00 by claunia · 8 comments
Owner

Originally created by @carlos-zamora on GitHub (Mar 19, 2020).

Originally assigned to: @carlos-zamora on GitHub.

Description of the new feature/enhancement

If you have the dropdown open...

  • Alt click a profile to open an auto sized pane of the profile.

related to #1000

Alternative Implementations

  1. no-auto
    • Alt+Click: vertical split
    • Alt+Shift+Click: horizontal split
  2. customizable split
    • right click opens a flyout with the options "vertical", "horizontal", "auto"
    • Alt+Click/Invoke behavior is defined in your profiles.json

But why bother?

I'm a very visual person. I like to see what profiles I have before opening one, personally.

Also, I forget what each index for the new-pane key binding maps to which profile. So I constantly find myself opening a new pane, seeing that it's the wrong one, closing it, checking the drop down, figuring out the index, then trying the correct key binding. That's on me for being a very visual person, but being able to short-circuit the process into an alt+click would feel pretty natural, I think.

Proposed technical implementation details

This would be pretty easy to implement, actually. For input, we'd just look at how the Settings flyout menu is handled. Then we just call the new-pane function off of TermApp with the profile that we targeted.

If we go with the alternative implementations, the above implementation is fundamentally the same. We'd just call the function with different parameters.

Comments after #5928

#5928 added the ability to split pane by alt+clicking a profile in the new tab flyout. This doesn't entirely close this issue. Though now you can open a pane without keybindings, the user should still be able to choose whether they want a horizontal or vertical pane. This issue has been promoted to track that scenario in particular.

Originally created by @carlos-zamora on GitHub (Mar 19, 2020). Originally assigned to: @carlos-zamora on GitHub. # Description of the new feature/enhancement If you have the dropdown open... - `Alt` click a profile to open an `auto` sized pane of the profile. related to #1000 ## Alternative Implementations 1. no-auto - Alt+Click: vertical split - Alt+Shift+Click: horizontal split 2. customizable split - right click opens a flyout with the options "vertical", "horizontal", "auto" - Alt+Click/Invoke behavior is defined in your profiles.json ## But why bother? I'm a very visual person. I like to see what profiles I have before opening one, personally. Also, I forget what each index for the new-pane key binding maps to which profile. So I constantly find myself opening a new pane, seeing that it's the wrong one, closing it, checking the drop down, figuring out the index, then trying the correct key binding. That's on me for being a very visual person, but being able to short-circuit the process into an alt+click would feel pretty natural, I think. # Proposed technical implementation details This would be pretty easy to implement, actually. For input, we'd just look at how the Settings flyout menu is handled. Then we just call the new-pane function off of TermApp with the profile that we targeted. If we go with the alternative implementations, the above implementation is fundamentally the same. We'd just call the function with different parameters. # Comments after #5928 #5928 added the ability to split pane by alt+clicking a profile in the new tab flyout. This doesn't entirely close this issue. Though now you can open a pane without keybindings, the user should still be able to choose whether they want a horizontal or vertical pane. This issue has been promoted to track that scenario in particular.
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 19, 2020):

Please link this from 1000.

@DHowett-MSFT commented on GitHub (Mar 19, 2020): Please link this from 1000.
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 24, 2020):

And yes, I love this idea.

@DHowett-MSFT commented on GitHub (Mar 24, 2020): And yes, I love this idea.
Author
Owner

@carlos-zamora commented on GitHub (May 14, 2020):

For the record, I've decided on this:

  • alt+click/enter --> auto splitPane
  • right click or menu key --> open context menu with...
---------------------
| Auto Split		|
| Horizontal Split	|
| Vertical Split	|
---------------------
@carlos-zamora commented on GitHub (May 14, 2020): For the record, I've decided on this: - alt+click/enter --> `auto` splitPane - right click or menu key --> open context menu with... ``` --------------------- | Auto Split | | Horizontal Split | | Vertical Split | --------------------- ```
Author
Owner

@carlos-zamora commented on GitHub (May 15, 2020):

Ok. I was working on this a bit more. FlyoutMenuItem has a Click event that seems to be called on any kind of invocation on the item (keyboard, mouse, touch, etc...). Creating a context menu on this would mean that we would have to break up Click into multiple event handlers (i.e. PointerPressed, KeyDown, etc...).

@DHowett-MSFT and I were thinking maybe the cleaner behavior would be to create a story for how to "move" a pane's configuration around. Think of it like dragging panes in VS Code and getting a shadow for where it would go.

@zadjii-msft Thoughts?

@carlos-zamora commented on GitHub (May 15, 2020): Ok. I was working on this a bit more. `FlyoutMenuItem` has a `Click` event that seems to be called on any kind of invocation on the item (keyboard, mouse, touch, etc...). Creating a context menu on this would mean that we would have to break up `Click` into multiple event handlers (i.e. `PointerPressed`, `KeyDown`, etc...). @DHowett-MSFT and I were thinking maybe the _cleaner_ behavior would be to create a story for how to "move" a pane's configuration around. Think of it like dragging panes in VS Code and getting a shadow for where it would go. @zadjii-msft Thoughts?
Author
Owner

@zadjii-msft commented on GitHub (May 15, 2020):

What if we did it on the tab context menu we added in #3789?

@zadjii-msft commented on GitHub (May 15, 2020): What if we did it on the tab context menu we added in #3789?
Author
Owner

@carlos-zamora commented on GitHub (May 15, 2020):

What if we did it on the tab context menu we added in #3789?

Sorry, I don't follow. You'd right click on a tab, get the context menu, then what?

@carlos-zamora commented on GitHub (May 15, 2020): > What if we did it on the tab context menu we added in #3789? Sorry, I don't follow. You'd right click on a tab, get the context menu, then what?
Author
Owner

@zadjii commented on GitHub (May 17, 2020):

Shoot, that's what I get for trying to reply to an issue on a vacation day from email.

I'm thinking something like this, from VSCode:
image

The "split right/left/up/down" that you get when clicking on a tab. I think that's also tracked somewhere in #1912

@zadjii commented on GitHub (May 17, 2020): Shoot, that's what I get for trying to reply to an issue on a vacation day from email. I'm thinking something like this, from VSCode: ![image](https://user-images.githubusercontent.com/534075/82161412-108b4100-9862-11ea-9911-f09b5c60d521.png) The "split right/left/up/down" that you get when clicking on a tab. I think that's also tracked somewhere in #1912
Author
Owner

@ghost commented on GitHub (Aug 31, 2021):

:tada:This issue was addressed in #10832, which has now been successfully released as Windows Terminal Preview v1.11.2421.0.🎉

Handy links:

@ghost commented on GitHub (Aug 31, 2021): :tada:This issue was addressed in #10832, which has now been successfully released as `Windows Terminal Preview v1.11.2421.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.11.2421.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7014