Skip to content

Update profile subpages - #20336

Merged
Dustin L. Howett (DHowett) merged 26 commits into
mainfrom
dev/cazamor/sui-rejuv/profile-rejuv
Sep 15, 2026
Merged

Dustin L. Howett (DHowett) merged 26 commits into
mainfrom
dev/cazamor/sui-rejuv/profile-rejuv

Conversation

@carlos-zamora

@carlos-zamora Carlos Zamora (carlos-zamora) commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Updates the individual profile pages to include:

  • icons + settings expanders/cards
  • SettingsResetButton: a new "reset value" button
  • a new "unfocused appearance" subpage with its own preview (similar to default appearance)

Detailed Description of the Pull Request / Additional comments

  • IInheritableViewModel: interface exposing HasSetting(), ClearSetting(), and SettingOverrideSource()
  • To help ensure that these are updated properly, a static assert was added that checks the number of profile settings. This is intended to be a tripwire to ensure future changes also update the reset buttons.
  • Profiles_UnfocusedAppearance.h/cpp/idl/xaml: the new unfocused appearance page
  • added helper functions FormatAccessibleName() and ColorToHexString() to deduplicate code that creates accessible names for SettingsExpanders across the entire SUI

Validation Steps Performed

  • settings search + deep link navigation
  • "reset value" button
  • accessibility pass with Narrator

PR Checklist

Related to #17000

@carlos-zamora

Copy link
Copy Markdown
Contributor Author

Demo

Profiles_Base

image

Profiles_UnfocusedAppearance

image

Tooltips

image image

Comment thread tools/GenerateSettingsIndex.ps1 Outdated
Comment on lines +397 to +402

// Optional resource name for a secondary label shown beneath the primary label in
// search results (i.e. "Nav_ProfileDefaults/Content" for the profile-defaults page links).
// Empty for most entries.
// NOTE: wrapped in USES_RESOURCE() (when set) for the same compile-time validation as ResourceName.
wil::zwstring_view SecondaryResourceName;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SecondaryResourceName changes in this file conflict with #20199 . They both have basically the same implementation with a different variable name. The consumer in SearchIndex.cpp also needs to be updated.

I'll go in and make this match the one from the other one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, turns out that it's a more complex merge conflict. I'll just have to deal with it when we start merging these PRs into main.

@carlos-zamora
Carlos Zamora (carlos-zamora) force-pushed the dev/cazamor/sui-rejuv/profile-rejuv branch from 236afe3 to 3faedd8 Compare July 30, 2026 20:34
Comment thread src/cascadia/TerminalSettingsEditor/Profiles_Base.xaml Fixed
Comment thread src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw Fixed
Comment thread src/cascadia/TerminalSettingsEditor/SettingResetButton.cpp Fixed
Comment thread src/cascadia/TerminalSettingsEditor/SettingResetButton.cpp Fixed
Comment thread src/cascadia/TerminalSettingsEditor/SettingResetButton.cpp Fixed
@github-actions

This comment has been minimized.

@carlos-zamora

Copy link
Copy Markdown
Contributor Author

Updated base branch (PR #20232) with a SettingsExpander collapse animation fix. Force pushed a rebase off of that.

Base automatically changed from dev/cazamor/sui-rejuv/setting-container to main August 24, 2026 23:20
@carlos-zamora
Carlos Zamora (carlos-zamora) force-pushed the dev/cazamor/sui-rejuv/profile-rejuv branch 2 times, most recently from 3ed0ad5 to ae1f638 Compare August 26, 2026 18:40
Carlos Zamora (carlos-zamora) added a commit that referenced this pull request Aug 26, 2026
Removes most of the em-dashes in our repo. Any related to the Settings
UI are covered in #20336.
Comment thread src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw Outdated
Comment thread src/cascadia/TerminalSettingsEditor/SettingResetButton.idl
void _OnClick(const Windows::Foundation::IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& args);
hstring _GenerateOverrideMessage(const Windows::Foundation::IInspectable& settingOrigin);

Windows::UI::Xaml::Data::INotifyPropertyChanged _subscribedTarget{ nullptr };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this create a reference cycle, where the page is holding a strong reference to the button and the button is holding a strong reference to the page? are we going to leak a bunch of SUI stuff when we close it? (honestly don't know)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no reference cycle here, but there was a memory leak because the subscription was never revoked. Fixed that.

For reference (heh), the reference graph is more like:

  • Page -- strong ref --> reset button
  • reset button -- strong ref --> view model (aka Target)
  • view model -- weak ref --> button (now _targetPropertyChangedRevoker)

Comment thread src/cascadia/TerminalSettingsEditor/MainPage.cpp Fixed
@github-actions

This comment has been minimized.

@carlos-zamora

This comment was marked as resolved.

@carlos-zamora
Carlos Zamora (carlos-zamora) force-pushed the dev/cazamor/sui-rejuv/profile-rejuv branch from 906e7b9 to 24f401c Compare September 4, 2026 18:57
@carlos-zamora

Copy link
Copy Markdown
Contributor Author

Dustin L. Howett (@DHowett) this one should be good to go now.

@carlos-zamora

Copy link
Copy Markdown
Contributor Author

Also want to follow up on this piece of feedback in the bug bash notes:

apart from the Name of the profile, everything in the top section is the "Task" which is launched (what, where, how). Is this a good opportunity to add that verbiage?

image image

I do like the idea of referring to this group of settings as something like "Task settings" or "Process settings". They definitely feel more fundamental than the rest. The problem I'm running into is more that we're already using the term "profile" for this concept. I'm concerned that changing the Expander.Header to "Task" deviates from that design decision just a little more than I'm comfortable with.

We could move Name and the delete button out, but I think that's too much of a deviation from the agreed upon design.

Conversely, we could update the header to use the term "Task". Maybe even only update the header for profile defaults. The issue I have there is that we're using an expander for those two settings and a header for the rest.

Long term, I think I'm more open to the idea of using "Task" thoughout the UI (i.e. settings UI, command palette, snippets?). We probably want to do a full pass on the nomenclature used and make sure that we're reusing the same terms when possible: "profile", "task", "session", "pane".

@DHowett

Copy link
Copy Markdown
Member

The problem I'm running into is more that we're already using the term "profile" for this concept.

So, the way I've justified it to myself is that a task is part of a profile.

A profile consists of three things: a task (what do we run, how do we run it?), behaviors (does OSC 777 work? what happens when the task exits? can the task write to the clipboard?) and appearance (you know this one)

Everything on this page is part of the profile. So it doesn't seem wrong or even a violation of the terms we're currently using to add Task, as a header, inside the profile page.

--

Conversely I could argue that the current setup is incorrect because it says "Welcome to the Profile editor, would you like to edit the Profile part of the Profile?" And inside that box is only the command line, starting directory, etc.; and then I can imagine a user asking "If that's the profile, what are these other things in the profile page?"

@DHowett

Copy link
Copy Markdown
Member

FWIW, a proposed glossary:

Task
thing to launch, where and how
Appearance
how it looks
Behaviors
how it acts
Profile
Task + appearance + behaviors
Session
a running instance of a profile (we started the task, applied the appearance, act in accordance with behaviors)
Pane
a place in the UI where a session is presented.

Execution/launching turns a profile into a session, and the session is put into a pane.

@DHowett

Copy link
Copy Markdown
Member

One place where this distinction matters is that when we get a handoff, all we have is a task (!) and we need to collect it with some sane behaviors and a sane appearance and pass it off as a session to be hosted in a pane.

…/profile-rejuv

# Conflicts:
#	src/cascadia/TerminalSettingsEditor/MainPage.cpp
#	src/cascadia/TerminalSettingsEditor/Resources/de-DE/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/es-ES/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/fr-FR/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/it-IT/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/ko-KR/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/pt-BR/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/qps-ploc/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/qps-ploca/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/qps-plocm/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/ru-RU/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/zh-CN/Resources.resw
#	src/cascadia/TerminalSettingsEditor/Resources/zh-TW/Resources.resw

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't be the last approver, but I do approve everything before this

Automation::AutomationProperties::SetName(NewKeyBinding(), RS_(L"EditAction_NewKeyBinding/Header"));
}

// The browse buttons live inside data templates, so we can't reference them by name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel like we could just use their Uids in the resw file

…26 22:10:12 (#20688)

Co-authored-by: Console Service Bot <consvc@microsoft.com>
@DHowett
Dustin L. Howett (DHowett) merged commit c0c72e9 into main Sep 15, 2026
17 of 20 checks passed
@DHowett
Dustin L. Howett (DHowett) deleted the dev/cazamor/sui-rejuv/profile-rejuv branch September 15, 2026 22:55
@amalamal0104-hub

Copy link
Copy Markdown
    // Nom de ressource facultatif pour une étiquette secondaire affichée sous l'étiquette principale dans
    // résultats de recherche (c.-à-d. « Nav_ProfileDefaults/Content » pour les liens de la page des paramètres par défaut du profil).
    // Vide pour la plupart des entrées.
    // REMARQUE : enveloppé dans USES_RESOURCE() (lorsqu’il est défini) pour la même validation au moment de la compilation que ResourceName.
    wil::zwstring_view SecondaryResourceName;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Sponsor
SponsoredKunjungi sekarang
Promo