[PR #9024] Pane refactor: separate pane into LeafPane and ParentPane, and make them winrt types #27388

Open
opened 2026-01-31 09:21:40 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/9024

State: closed
Merged: No


Summary of the Pull Request

  • Replaces our pane class with LeafPane and ParentPane
  • LeafPane and ParentPane are now winrt types, allowing us to add controls to their xaml files much more easily

There are several todos left:

  • Maximize/Restore (i.e. zoomed leaf panes)
  • Update MRU pane stuff in TerminalTab
    - this requires a bit of discussion on how we want the tab to know about closed leaves so it can update the MRU list
  • Fix entrance animation not working
  • Fix issues with pane splits in startup actions/commandline arguments Turns out these issues also exist in main
  • Fix focus not transferring properly when a pane is closed
  • Code health: LayoutSizeNode does not need to live in ParentPane
  • Code health: Add comments/transfer comments from old pane implementation
  • Various todos marked in the code
  • Delete all the old pane code (leaving this for towards the end just in case something breaks and I want to see how it was done before)
  • Delete all the references to the previous pane type in TerminalTab (most of them have just been commented out for now for the same reason as above
    - this is mostly done, pane.cpp has been removed and references to the old pane type have been gone
    - keeping pane.h around for now because we might want to put some common stuff in there

References

Huge shoutout to @mcpiroman, a lot of the design for this PR was taken from #4068

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I work here

Validation Steps Performed

For now, opening and closing panes works fine (i.e. it is somewhat functional but I'm sure there are bugs that slipped past me)

**Original Pull Request:** https://github.com/microsoft/terminal/pull/9024 **State:** closed **Merged:** No --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request - Replaces our pane class with LeafPane and ParentPane - LeafPane and ParentPane are now winrt types, allowing us to add controls to their xaml files much more easily There are **several** todos left: * [x] Maximize/Restore (i.e. zoomed leaf panes) * [x] Update MRU pane stuff in TerminalTab - this requires a bit of discussion on how we want the tab to know about closed leaves so it can update the MRU list * [x] Fix entrance animation not working * [x] <del>Fix issues with pane splits in startup actions/commandline arguments</del> Turns out these issues also exist in main * [ ] Fix focus not transferring properly when a pane is closed * [x] Code health: LayoutSizeNode does not need to live in ParentPane * [x] Code health: Add comments/transfer comments from old pane implementation * [x] Various todos marked in the code * [x] Delete all the old pane code (leaving this for towards the end just in case something breaks and I want to see how it was done before) * [x] Delete all the references to the previous pane type in `TerminalTab` (most of them have just been commented out for now for the same reason as above - this is mostly done, pane.cpp has been removed and references to the old pane type have been gone - keeping `pane.h` around for now because we might want to put some common stuff in there <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References Huge shoutout to @mcpiroman, a lot of the design for this PR was taken from [#4068](https://github.com/microsoft/terminal/pull/4068) <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] 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. * [x] I work here <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed For now, opening and closing panes works fine (i.e. it is somewhat functional but I'm sure there are bugs that slipped past me)
claunia added the pull-request label 2026-01-31 09:21:40 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27388