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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9024
Author: @PankajBhojwani
Created: 2/3/2021
Status: Closed

Base: mainHead: dev/pabhoj/pane_refactor


📝 Commits (10+)

📊 Changes

36 files changed (+4130 additions, -3333 deletions)

View changed files

.github/actions/spelling/README.md (+15 -0)
📝 .github/actions/spelling/advice.md (+16 -18)
📝 .github/actions/spelling/allow/allow.txt (+55 -0)
📝 .github/actions/spelling/allow/apis.txt (+96 -0)
📝 .github/actions/spelling/allow/fonts.txt (+1 -0)
📝 .github/actions/spelling/allow/math.txt (+8 -0)
📝 .github/actions/spelling/allow/microsoft.txt (+20 -0)
📝 .github/actions/spelling/allow/names.txt (+14 -0)
.github/actions/spelling/candidate.patterns (+523 -0)
📝 .github/actions/spelling/excludes.txt (+43 -5)
📝 .github/actions/spelling/expect/alphabet.txt (+0 -8)
📝 .github/actions/spelling/expect/expect.txt (+214 -736)
📝 .github/actions/spelling/expect/web.txt (+1 -11)
.github/actions/spelling/line_forbidden.patterns (+62 -0)
📝 .github/actions/spelling/patterns/patterns.txt (+79 -8)
📝 .github/actions/spelling/reject.txt (+9 -19)
.github/workflows/spelling.yml (+0 -19)
.github/workflows/spelling2.yml (+134 -0)
src/cascadia/TerminalApp/IPane.idl (+45 -0)
src/cascadia/TerminalApp/LeafPane.cpp (+699 -0)

...and 16 more files

📄 Description

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)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9024 **Author:** [@PankajBhojwani](https://github.com/PankajBhojwani) **Created:** 2/3/2021 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dev/pabhoj/pane_refactor` --- ### 📝 Commits (10+) - [`ed00e40`](https://github.com/microsoft/terminal/commit/ed00e4011bed0641a6734efff5c48b1701c9d9de) files in place - [`4a8d4b5`](https://github.com/microsoft/terminal/commit/4a8d4b539657b29b7b84a5ba1c96fdf55ea6b7f4) IPane interface - [`bcf1720`](https://github.com/microsoft/terminal/commit/bcf17204525a18d9ed67d4ef836a86b138eeff72) ascribe to IPane - [`194f849`](https://github.com/microsoft/terminal/commit/194f849448441afd6a46b34fbdb04d6bcfaa6cae) initial xaml - [`e622876`](https://github.com/microsoft/terminal/commit/e622876ab0e56eac0c43be2e77b537b8a2c49490) more baby steps - [`504c5c2`](https://github.com/microsoft/terminal/commit/504c5c2110bd9e4279736c30f07110663917d080) most of skeleton in - [`74087d6`](https://github.com/microsoft/terminal/commit/74087d659af620b53665cf7c769211cc49da660d) builds I guess - [`b0959f1`](https://github.com/microsoft/terminal/commit/b0959f10b646749875457cecd957b5d83c46d7d5) still builds - [`d7a4c04`](https://github.com/microsoft/terminal/commit/d7a4c0409952d97318aab4063ac145204fb5bdaa) sloooowly - [`f3dc0a2`](https://github.com/microsoft/terminal/commit/f3dc0a230b04472f3370c53f5ee0e2ad1673adaa) moving the code ### 📊 Changes **36 files changed** (+4130 additions, -3333 deletions) <details> <summary>View changed files</summary> ➕ `.github/actions/spelling/README.md` (+15 -0) 📝 `.github/actions/spelling/advice.md` (+16 -18) 📝 `.github/actions/spelling/allow/allow.txt` (+55 -0) 📝 `.github/actions/spelling/allow/apis.txt` (+96 -0) 📝 `.github/actions/spelling/allow/fonts.txt` (+1 -0) 📝 `.github/actions/spelling/allow/math.txt` (+8 -0) 📝 `.github/actions/spelling/allow/microsoft.txt` (+20 -0) 📝 `.github/actions/spelling/allow/names.txt` (+14 -0) ➕ `.github/actions/spelling/candidate.patterns` (+523 -0) 📝 `.github/actions/spelling/excludes.txt` (+43 -5) 📝 `.github/actions/spelling/expect/alphabet.txt` (+0 -8) 📝 `.github/actions/spelling/expect/expect.txt` (+214 -736) 📝 `.github/actions/spelling/expect/web.txt` (+1 -11) ➕ `.github/actions/spelling/line_forbidden.patterns` (+62 -0) 📝 `.github/actions/spelling/patterns/patterns.txt` (+79 -8) 📝 `.github/actions/spelling/reject.txt` (+9 -19) ➖ `.github/workflows/spelling.yml` (+0 -19) ➕ `.github/workflows/spelling2.yml` (+134 -0) ➕ `src/cascadia/TerminalApp/IPane.idl` (+45 -0) ➕ `src/cascadia/TerminalApp/LeafPane.cpp` (+699 -0) _...and 16 more files_ </details> ### 📄 Description <!-- 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:21:39 +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#27383