[PR #11877] [MERGED] Apply MVVM for profiles in SUI #28774

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11877
Author: @carlos-zamora
Created: 12/3/2021
Status: Merged
Merged: 12/8/2021
Merged by: @undefined

Base: mainHead: dev/cazamor/eim/mvvm-profiles


📝 Commits (1)

  • 4487d55 Apply MVVM for profiles in SUI

📊 Changes

17 files changed (+837 additions, -804 deletions)

View changed files

📝 src/cascadia/TerminalSettingsEditor/Appearances.cpp (+2 -2)
📝 src/cascadia/TerminalSettingsEditor/Appearances.h (+3 -3)
📝 src/cascadia/TerminalSettingsEditor/GlobalAppearance.h (+2 -2)
📝 src/cascadia/TerminalSettingsEditor/Interaction.h (+2 -2)
📝 src/cascadia/TerminalSettingsEditor/Launch.h (+3 -3)
📝 src/cascadia/TerminalSettingsEditor/MainPage.cpp (+9 -11)
📝 src/cascadia/TerminalSettingsEditor/MainPage.h (+0 -1)
📝 src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj (+9 -0)
📝 src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters (+1 -0)
src/cascadia/TerminalSettingsEditor/ProfileViewModel.cpp (+417 -0)
src/cascadia/TerminalSettingsEditor/ProfileViewModel.h (+151 -0)
src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl (+97 -0)
📝 src/cascadia/TerminalSettingsEditor/Profiles.cpp (+20 -426)
📝 src/cascadia/TerminalSettingsEditor/Profiles.h (+7 -147)
📝 src/cascadia/TerminalSettingsEditor/Profiles.idl (+3 -96)
📝 src/cascadia/TerminalSettingsEditor/Profiles.xaml (+88 -88)
📝 src/cascadia/TerminalSettingsEditor/Utils.h (+23 -23)

📄 Description

Summary of the Pull Request

Cleans up ProfileViewModel, Profiles, and ProfilePageNavigationState to move all of the view model responsibilities over to ProfileViewModel. We don't actually store the ProfilePageNavigationState anymore. We only use it as a way to transfer information to the new page.

References

#9207 - Apply MVVM

Detailed Description of the Pull Request / Additional comments

  • I pulled out ProfileViewModel into its own file to keep things cleaner. It was getting pretty big.
  • The font lists are now stored in a static location in ProfileViewModel, which means that we can reuse the same list between pages.
  • the profile pivot was also moved to the ProfileViewModel and stored as a static value.

Validation Steps Performed

pivot behavior is the same
font list is still populated


🔄 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/11877 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 12/3/2021 **Status:** ✅ Merged **Merged:** 12/8/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/cazamor/eim/mvvm-profiles` --- ### 📝 Commits (1) - [`4487d55`](https://github.com/microsoft/terminal/commit/4487d5558e3a7e3f0951af7814b37fda1469b571) Apply MVVM for profiles in SUI ### 📊 Changes **17 files changed** (+837 additions, -804 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsEditor/Appearances.cpp` (+2 -2) 📝 `src/cascadia/TerminalSettingsEditor/Appearances.h` (+3 -3) 📝 `src/cascadia/TerminalSettingsEditor/GlobalAppearance.h` (+2 -2) 📝 `src/cascadia/TerminalSettingsEditor/Interaction.h` (+2 -2) 📝 `src/cascadia/TerminalSettingsEditor/Launch.h` (+3 -3) 📝 `src/cascadia/TerminalSettingsEditor/MainPage.cpp` (+9 -11) 📝 `src/cascadia/TerminalSettingsEditor/MainPage.h` (+0 -1) 📝 `src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj` (+9 -0) 📝 `src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters` (+1 -0) ➕ `src/cascadia/TerminalSettingsEditor/ProfileViewModel.cpp` (+417 -0) ➕ `src/cascadia/TerminalSettingsEditor/ProfileViewModel.h` (+151 -0) ➕ `src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl` (+97 -0) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.cpp` (+20 -426) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.h` (+7 -147) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.idl` (+3 -96) 📝 `src/cascadia/TerminalSettingsEditor/Profiles.xaml` (+88 -88) 📝 `src/cascadia/TerminalSettingsEditor/Utils.h` (+23 -23) </details> ### 📄 Description ## Summary of the Pull Request Cleans up `ProfileViewModel`, `Profiles`, and `ProfilePageNavigationState` to move all of the view model responsibilities over to `ProfileViewModel`. We don't actually store the `ProfilePageNavigationState` anymore. We only use it as a way to transfer information to the new page. ## References #9207 - Apply MVVM ## Detailed Description of the Pull Request / Additional comments - I pulled out `ProfileViewModel` into its own file to keep things cleaner. It was getting pretty big. - The font lists are now stored in a static location in `ProfileViewModel`, which means that we can reuse the same list between pages. - the profile pivot was also moved to the `ProfileViewModel` and stored as a static value. ## Validation Steps Performed ✅ pivot behavior is the same ✅ font list is still populated --- <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:30: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#28774