-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add close pane to the tab context menu (when there are multiple panes) #13580
Comments
You mean like the |
I guess all three options would be nice, though I was mainly talking about the first. I didn't realize it was even an option since I didn't think to check the actions, and it's something I feel should be available via a menu and not just a shortcut, both to make it more obvious that it is an option, and to make it easier to do without having to remember the shortcut, especially since it's likely not something most would use very often. I see three ways of handling this. The cleanest, most space-efficient, and probably most obvious would be to add the actions to the tab's right-click menu, e.g. "Close active pane," "Move active pane to new tab," "Make active pane full-size" (zoom it), and "Close all non-active panes" (though this one could be dangerous and would probably benefit from a confirmation dialog). Then whichever pane is active when right-clicking the tab and selecting one of the options would be the one acted on. The second possibility would be to add a small title bar to each pane that could be right-clicked, which would bring up a menu with the previous options, minus the word active or replacing it with "other" in the case of closing the other panes, of course. The third option would be to add a few small buttons at the top-right of each pane, an x to close it, a square to maximize it or double square to restore it, and something like a square with an arrow for separating it out into a new tab. |
FWIW, the general pattern the Terminal uses is that all the actions for the Terminal are in the Command Palette. We don't have a whole lot of UI space, so the command palette is a great way for us to have LOTS of actions while also making sure most menus aren't excessively cluttered. That being said
|
how is this on the backlog? How do people even use this half-baked capability? |
@rismoney Probably because most people just close panes with the keyboard (ctrl+shift+w), or the Command Palette ctrl+shift+p. If you're passionate about the feature, I can try and help provide a roadmap of where the code changes would need to go. |
keyboard shortcuts ftw! |
@zadjii-msft I don't know if the offer is still on the table (or open to outside help), but I would love to take a crack at this and a roadmap would be extremely helpful! |
Of course!
Lemme know if you need any more help! |
## Summary of the Pull Request Adding a 'Close Pane' menu item in the context menu. ## References and Relevant Issues #13580 ## Detailed Description of the Pull Request / Additional comments If a user decides to split a tab to create multiple panes through the context menu, they should be able to then close the pane via the context menu too. This PR introduces a new context menu item, 'Close Pane', that only appears when a user has 2 or more panes in a tab. When a user clicks close pane, the _active_pane will be closed. ## Validation Steps Performed ![close_pane_terminal](https://user-images.githubusercontent.com/98557455/232649000-8b521070-4f1b-4da9-8092-6ff802e91e2c.gif) As it's my first PR, I still need to understand how to go through the testing suite. ## PR Checklist - [x] Closes #13580 - [ ] Tests added/passed - [ ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ ] Schema updated (if necessary) --------- Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com>
Description of the new feature/enhancement
Once a tab is split, there's no way to return it to normal, meaning either having to continue working in half the space or starting a new tab and losing everything from the current one. It should allow for either closing one half or splitting them into two tabs.
Proposed technical implementation details (optional)
The text was updated successfully, but these errors were encountered: