Added Close Pane to Context Menu#15198
Conversation
You're in luck! For You will likely need to run |
|
Also - any suggestions on what the icon should be @zadjii-msft - https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-ui-symbol-font? |
Yep looks like it! I bet the cmd version wasn't robust enough to be run from outside the solution root directory 🤷 |
zadjii-msft
left a comment
There was a problem hiding this comment.
As far as icons, maybe e89f, "ClosePane"? That's not great, since like, you could have a horizontal split, or be closing the left one... Honestly, I think it's okay without one for now.
Update to this comment: The below suggestion I made does not work as ctl + shift + w uses ClosePane --> back to the drawing board :). Does it make sense to call DetachPane instead of ClosePane in the menu item click?
Then in DetachPane it makes sense to me that we would know that only one pane is left. With these changes it seems like it resolves the edge case you mentioned. I'm very new to the codebase so if this is not quite the way you were thinking this should be implemented let me know :) Not really sure what DetachPane vs. ClosePane does. |
I'm not sure if this is what you were thinking but seems to work ok if the check is in _UpdateActivePane(). |
carlos-zamora
left a comment
There was a problem hiding this comment.
Personally, I think we should...
- remove the tooltip (doesn't seem useful)
- make the menu item always visible/active (regardless of number of open panes)
Thoughts? Open to discussion/disagreement on this one.
zadjii-msft
left a comment
There was a problem hiding this comment.
I love this. This is exactly what I'd've done. Thanks for bearing with us!
| if (_rootPane->GetLeafPaneCount() == 1) | ||
| { | ||
| _closePaneMenuItem.Visibility(WUX::Visibility::Collapsed); | ||
| } |
There was a problem hiding this comment.
this is infinitely better than before
There was a problem hiding this comment.
Yay! Completely new to the project and really appreciate the support and guidance from both you and @carlos-zamora. Excited to try out some new issues too.
FYI, I LOVE the walkthroughs. Makes it way easier to get started for people who aren't as experienced in C++ or the Terminal project :)
Co-authored-by: Carlos Zamora <[email protected]>
carlos-zamora
left a comment
There was a problem hiding this comment.
Love it. Thanks so much!
DHowett
left a comment
There was a problem hiding this comment.
Love it, thanks for the contribution @joadoumie !



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
As it's my first PR, I still need to understand how to go through the testing suite.
PR Checklist