[PR #10910] [MERGED] Hide profiles by default if they aren't new #28294

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10910
Author: @lhecker
Created: 8/9/2021
Status: Merged
Merged: 8/16/2021
Merged by: @undefined

Base: mainHead: dev/lhecker/app-state-generated-profiles


📝 Commits (3)

  • 3a50435 Hide profiles by default if they aren't new
  • 2457c78 Address reviewer comments
  • ad2c346 Address Dustin's comments

📊 Changes

2 files changed (+48 additions, -8 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.h (+6 -1)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+42 -7)

📄 Description

Let's say a user doesn't know that they need to write "hidden": true in
order to prevent a profile from showing up (and a settings UI doesn't exist).
Naturally they would open settings.json and try to remove the profile object.
This section of code recognizes if a profile was seen before and marks it as
"hidden": true by default and thus ensures the behavior the user expects:
Profiles won't show up again after they've been removed from settings.json.

References

#8324 - Application State

PR Checklist

Validation Steps Performed

  • settings.json/state.json are created if they don't exist ✔️
  • Removing any profile from settings.json doesn't cause it to appear again ✔️
  • Hitting save in SUI creates profiles with "hidden": true ✔️
  • Removing a default profile and hitting save in SUI works
    An empty object is added instead.

🔄 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/10910 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 8/9/2021 **Status:** ✅ Merged **Merged:** 8/16/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/app-state-generated-profiles` --- ### 📝 Commits (3) - [`3a50435`](https://github.com/microsoft/terminal/commit/3a50435799e0305e53cc68dfd891b513b4f33c40) Hide profiles by default if they aren't new - [`2457c78`](https://github.com/microsoft/terminal/commit/2457c78dbf7912ae1e5186c1b93ee776c47ef344) Address reviewer comments - [`ad2c346`](https://github.com/microsoft/terminal/commit/ad2c346b164db04cf251f4f3153366f8967e2642) Address Dustin's comments ### 📊 Changes **2 files changed** (+48 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.h` (+6 -1) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+42 -7) </details> ### 📄 Description Let's say a user doesn't know that they need to write `"hidden": true` in order to prevent a profile from showing up (and a settings UI doesn't exist). Naturally they would open settings.json and try to remove the profile object. This section of code recognizes if a profile was seen before and marks it as `"hidden": true` by default and thus ensures the behavior the user expects: Profiles won't show up again after they've been removed from settings.json. ## References #8324 - Application State ## PR Checklist * [x] Closes #8270 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * settings.json/state.json are created if they don't exist ✔️ * Removing any profile from settings.json doesn't cause it to appear again ✔️ * Hitting save in SUI creates profiles with `"hidden": true` ✔️ * Removing a default profile and hitting save in SUI works ❌ An empty object is added instead. --- <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:27:36 +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#28294