[PR #13763] [MERGED] New Tab Menu Customization #29755

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13763
Author: @FWest98
Created: 8/17/2022
Status: Merged
Merged: 12/9/2022
Merged by: @undefined

Base: mainHead: fw/profiles_dropdown


📝 Commits (10+)

  • 7e922ab Adding a basic NewTabMenuEntry and some scaffolding
  • 88a336b Add SeparatorEntry but it breaks the build
  • cec114e Implemented FolderEntry and SeparatorEntry
  • 294c13a Add Profile and RemainingProfiles entry definitions
  • 6676785 Full implementation of the feature
  • ea62c28 Add ProfileCollection abstraction
  • 1d5f6d3 Code cleanup and documentation
  • 40f2a3e Update schema
  • b140c75 Code style fixes
  • fc18f1f Add words

📊 Changes

32 files changed (+1452 additions, -82 deletions)

View changed files

📝 .github/actions/spelling/allow/names.txt (+1 -0)
📝 .github/actions/spelling/expect/expect.txt (+2 -0)
📝 doc/cascadia/profiles.schema.json (+180 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+1 -0)
📝 src/cascadia/TerminalApp/Resources/en-US/Resources.resw (+15 -8)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+218 -73)
📝 src/cascadia/TerminalApp/TerminalPage.h (+4 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.h (+2 -0)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+164 -0)
src/cascadia/TerminalSettingsModel/FolderEntry.cpp (+120 -0)
src/cascadia/TerminalSettingsModel/FolderEntry.h (+55 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.h (+2 -0)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl (+2 -0)
📝 src/cascadia/TerminalSettingsModel/MTSMSettings.h (+2 -1)
src/cascadia/TerminalSettingsModel/MatchProfilesEntry.cpp (+73 -0)
src/cascadia/TerminalSettingsModel/MatchProfilesEntry.h (+42 -0)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj (+43 -0)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj.filters (+2 -0)
src/cascadia/TerminalSettingsModel/NewTabMenuEntry.cpp (+58 -0)
src/cascadia/TerminalSettingsModel/NewTabMenuEntry.h (+72 -0)

...and 12 more files

📄 Description

Implements an initial version of #1571 as it has been specified, the
only big thing missing now is the possibility to add actions, which
depends on #6899.

Further upcoming spec tracked in #12584

Implemented according to instructions by @zadjii-msft. Mostly
relatively straightforward, but some notable details:

  • In accordance with the spec, the counting/indexing of profiles is
    based on their index in the json (so the index of the profile, not of
    the entry in the menu).
  • Resolving a profile name to an actual profile is done in a similar
    fashion as how currently the DefaultProfile field is populated: the
    CascadiaSettings constructor now has an extra _resolve function
    that will iterate over all entries and resolve the names to instances;
    this same function will compute all profile sets (the set of all
    profiles from source "x", and the set of all remaining profiles)
  • Fun fact: I spent two whole afternoons and evenings trying to add 2
    classes (which turned out to be a trivial .vcxproj error), and then
    managed to finish the entire rest of it in another afternoon and
    evening...

Validation Steps Performed

A lot of manual testing; as mentioned above I was not able to run any
tests so I could not add them for now. However, the logic is not too
tricky so it should be relatively safe.

Closes #1571


🔄 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/13763 **Author:** [@FWest98](https://github.com/FWest98) **Created:** 8/17/2022 **Status:** ✅ Merged **Merged:** 12/9/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `fw/profiles_dropdown` --- ### 📝 Commits (10+) - [`7e922ab`](https://github.com/microsoft/terminal/commit/7e922ab4bb30b9e2aef653a34ccb051d49ce0770) Adding a basic NewTabMenuEntry and some scaffolding - [`88a336b`](https://github.com/microsoft/terminal/commit/88a336b7cd88bfc2c7da5eac846c3d2f6250769a) Add SeparatorEntry but it breaks the build - [`cec114e`](https://github.com/microsoft/terminal/commit/cec114e7bbeb29865bc6332681aa0279f9cf83f5) Implemented FolderEntry and SeparatorEntry - [`294c13a`](https://github.com/microsoft/terminal/commit/294c13a36ada7a408914b6b0e6e2d017ac313a47) Add Profile and RemainingProfiles entry definitions - [`6676785`](https://github.com/microsoft/terminal/commit/66767856a433f8c8ee3cb6a7deb72f072d24288e) Full implementation of the feature - [`ea62c28`](https://github.com/microsoft/terminal/commit/ea62c2885f5814f6cfc4811e7cbdd4eefeba7571) Add ProfileCollection abstraction - [`1d5f6d3`](https://github.com/microsoft/terminal/commit/1d5f6d3e0324920d67540955d64281d11e580332) Code cleanup and documentation - [`40f2a3e`](https://github.com/microsoft/terminal/commit/40f2a3ea262178e1b3791c991f39037cb79948d1) Update schema - [`b140c75`](https://github.com/microsoft/terminal/commit/b140c7506363a15c432d2566406468b316fb95fe) Code style fixes - [`fc18f1f`](https://github.com/microsoft/terminal/commit/fc18f1f111df74ebf5c57b8ccb48a6bdb611dd49) Add words ### 📊 Changes **32 files changed** (+1452 additions, -82 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/names.txt` (+1 -0) 📝 `.github/actions/spelling/expect/expect.txt` (+2 -0) 📝 `doc/cascadia/profiles.schema.json` (+180 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+1 -0) 📝 `src/cascadia/TerminalApp/Resources/en-US/Resources.resw` (+15 -8) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+218 -73) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+4 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.h` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+164 -0) ➕ `src/cascadia/TerminalSettingsModel/FolderEntry.cpp` (+120 -0) ➕ `src/cascadia/TerminalSettingsModel/FolderEntry.h` (+55 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.h` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/MTSMSettings.h` (+2 -1) ➕ `src/cascadia/TerminalSettingsModel/MatchProfilesEntry.cpp` (+73 -0) ➕ `src/cascadia/TerminalSettingsModel/MatchProfilesEntry.h` (+42 -0) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj` (+43 -0) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj.filters` (+2 -0) ➕ `src/cascadia/TerminalSettingsModel/NewTabMenuEntry.cpp` (+58 -0) ➕ `src/cascadia/TerminalSettingsModel/NewTabMenuEntry.h` (+72 -0) _...and 12 more files_ </details> ### 📄 Description Implements an initial version of #1571 as it has been specified, the only big thing missing now is the possibility to add actions, which depends on #6899. Further upcoming spec tracked in #12584 Implemented according to [instructions by @zadjii-msft]. Mostly relatively straightforward, but some notable details: - In accordance with the spec, the counting/indexing of profiles is based on their index in the json (so the index of the profile, not of the entry in the menu). - Resolving a profile name to an actual profile is done in a similar fashion as how currently the `DefaultProfile` field is populated: the `CascadiaSettings` constructor now has an extra `_resolve` function that will iterate over all entries and resolve the names to instances; this same function will compute all profile sets (the set of all profiles from source "x", and the set of all remaining profiles) - ~Fun~ fact: I spent two whole afternoons and evenings trying to add 2 classes (which turned out to be a trivial `.vcxproj` error), and then managed to finish the entire rest of it in another afternoon and evening... ## Validation Steps Performed A lot of manual testing; as mentioned above I was not able to run any tests so I could not add them for now. However, the logic is not too tricky so it should be relatively safe. Closes #1571 [instructions by @zadjii-msft]: https://github.com/microsoft/terminal/issues/1571#issuecomment-1184851000 --- <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:36:44 +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#29755