[PR #8165] Introduce Page parameters to SUI #27127

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

Original Pull Request: https://github.com/microsoft/terminal/pull/8165

State: closed
Merged: Yes


Summary of the Pull Request

Navigating to pages in the Settings UI now passes in a state of the
relevant settings at the time of navigation. This helps scope each page
to its relevant settings. For example, a Profile page now has access
to the relevant Profile and color schemes. This allows the page to see
all of the relevant profile settings, and (soon) display the possible
color schemes to choose from.

If a developer wants a page to have access to more settings or context,
they can now add it to the pertinent NavigationState runtimeclass and
pass it to the page in MainPage (most likely Navigate()).

References

#1564 - Settings UI

Additional Comments

  • Pages are not constructed when you navigate to them. Thus, we cannot
    track the state by passing it into the constructor of a Page.
  • This PR also does a little bit of polish in MainPage.cpp's
    navigation functions such as defining tags at the top of the file and
    simplifying/de-static-ifying Navigate().
  • This also fixes a bug where loading the settings page would always
    take you to the first item.

Validation Steps Performed

Visited every page on the Settings UI.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/8165 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Navigating to pages in the Settings UI now passes in a state of the relevant settings at the time of navigation. This helps scope each page to its relevant settings. For example, a `Profile` page now has access to the relevant `Profile` and color schemes. This allows the page to see all of the relevant profile settings, and (soon) display the possible color schemes to choose from. If a developer wants a page to have access to more settings or context, they can now add it to the pertinent NavigationState runtimeclass and pass it to the page in `MainPage` (most likely `Navigate()`). ## References #1564 - Settings UI ## Additional Comments - Pages are not constructed when you navigate to them. Thus, we cannot track the state by passing it into the constructor of a `Page`. - This PR also does a little bit of polish in `MainPage.cpp`'s navigation functions such as defining tags at the top of the file and simplifying/de-static-ifying `Navigate()`. - This also fixes a bug where loading the settings page would always take you to the first item. ## Validation Steps Performed Visited every page on the Settings UI.
claunia added the pull-request label 2026-01-31 09:20:09 +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#27127