[PR #11373] [MERGED] Misc pane refactoring #28537

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11373
Author: @Rosefield
Created: 9/29/2021
Status: Merged
Merged: 12/8/2021
Merged by: @undefined

Base: mainHead: dev/misc-pane-refactoring


📝 Commits (6)

  • cfb4157 Refactor: Make WalkTree iterator more useful and add a simple _FindTree based on it.
  • 4974d2a Consolidate PreCalculateAutoSplit and PreCalculateCanSplit since they basically do the same thing.
  • e51face Dead code: pane relayout no longer does anything since it uses star sizing instead of actual pixel sizing.
  • bb03d7e Code review: make some things const& that could be, typo.
  • 60f6d1c Merge remote-tracking branch 'origin/main' into dev/misc-pane-refactoring
  • f6a50db Merge remote-tracking branch 'origin/main' into dev/misc-pane-refactoring

📊 Changes

7 files changed (+108 additions, -376 deletions)

View changed files

📝 src/cascadia/TerminalApp/Pane.cpp (+56 -249)
📝 src/cascadia/TerminalApp/Pane.h (+29 -18)
📝 src/cascadia/TerminalApp/TabManagement.cpp (+0 -12)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+3 -26)
📝 src/cascadia/TerminalApp/TerminalPage.h (+0 -2)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+17 -63)
📝 src/cascadia/TerminalApp/TerminalTab.h (+3 -6)

📄 Description

Some changes I had sitting around after working on #11153 that weren't
appropriate to put in that pr. Each commit should be independent if
particular ones are unwanted.

Slight overlap with #11305. There is some more code removal that can be
done after that is merged, specifically AttachPane can be deleted once
SplitPane handles adding multiple panes at once correctly.

Details

  • Makes WalkTree more useful, and closer to a real iterator. Add a
    convenient _FindPane built on top of that.
  • Coalesces PrecalculateAutoSplit and PreCalculateCanSplit since
    they are basically identical logic.
  • Pane::Relayout functionally did nothing because sizing was switched
    to star sizing at some point in the past, so it was just deleted.

Validation

Quick smoke test to make sure automatic splitting works, focus movement
still works correctly.


🔄 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/11373 **Author:** [@Rosefield](https://github.com/Rosefield) **Created:** 9/29/2021 **Status:** ✅ Merged **Merged:** 12/8/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/misc-pane-refactoring` --- ### 📝 Commits (6) - [`cfb4157`](https://github.com/microsoft/terminal/commit/cfb41579b9ace8d785d15b5294e3e5c00f4f4fa1) Refactor: Make WalkTree iterator more useful and add a simple _FindTree based on it. - [`4974d2a`](https://github.com/microsoft/terminal/commit/4974d2a3dfe0559b551c94003e207777b5fdb14a) Consolidate PreCalculateAutoSplit and PreCalculateCanSplit since they basically do the same thing. - [`e51face`](https://github.com/microsoft/terminal/commit/e51face5e52589cbf96c8fd04ffcabf12d9c6d0f) Dead code: pane relayout no longer does anything since it uses star sizing instead of actual pixel sizing. - [`bb03d7e`](https://github.com/microsoft/terminal/commit/bb03d7e8f3018d65de290a42c8f586b66d15d0b1) Code review: make some things const& that could be, typo. - [`60f6d1c`](https://github.com/microsoft/terminal/commit/60f6d1cdffd0e55022dae94e241d2aa0c12cab6d) Merge remote-tracking branch 'origin/main' into dev/misc-pane-refactoring - [`f6a50db`](https://github.com/microsoft/terminal/commit/f6a50db2d70f7bf295237a18d6bad7f4d91a5f2f) Merge remote-tracking branch 'origin/main' into dev/misc-pane-refactoring ### 📊 Changes **7 files changed** (+108 additions, -376 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/Pane.cpp` (+56 -249) 📝 `src/cascadia/TerminalApp/Pane.h` (+29 -18) 📝 `src/cascadia/TerminalApp/TabManagement.cpp` (+0 -12) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+3 -26) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+0 -2) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+17 -63) 📝 `src/cascadia/TerminalApp/TerminalTab.h` (+3 -6) </details> ### 📄 Description Some changes I had sitting around after working on #11153 that weren't appropriate to put in that pr. Each commit should be independent if particular ones are unwanted. Slight overlap with #11305. There is some more code removal that can be done after that is merged, specifically `AttachPane` can be deleted once `SplitPane` handles adding multiple panes at once correctly. ## Details - Makes `WalkTree` more useful, and closer to a real iterator. Add a convenient `_FindPane` built on top of that. - Coalesces `PrecalculateAutoSplit` and `PreCalculateCanSplit` since they are basically identical logic. - `Pane::Relayout` functionally did nothing because sizing was switched to `star` sizing at some point in the past, so it was just deleted. ## Validation Quick smoke test to make sure automatic splitting works, focus movement still works correctly. --- <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:29:10 +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#28537