[PR #9196] [MERGED] Redesign color schemes page #27460

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9196
Author: @carlos-zamora
Created: 2/18/2021
Status: ✅ Merged
Merged: 2/19/2021
Merged by: @undefined

Base: main ← Head: dev/cazamor/sui/color-schemes-redesign


📝 Commits (9)

  • 164d84e Redesign color schemes page
  • 7b3f6d1 redesign color table
  • e8ac4a7 add automatic reflow
  • 1071c46 add tooltips and automation properties
  • ca6ec7a add remaining tooltips and automation properties
  • cf2ad59 address Dustin's feedback
  • 319b990 match adaptive trigger to navigation view trigger
  • 293b336 address Griese feedback
  • 9db6633 fix system color binding

📊 Changes

5 files changed (+353 additions, -239 deletions)

View changed files

📝 src/cascadia/TerminalSettingsEditor/ColorSchemes.cpp (+131 -11)
📝 src/cascadia/TerminalSettingsEditor/ColorSchemes.h (+9 -3)
📝 src/cascadia/TerminalSettingsEditor/ColorSchemes.idl (+12 -3)
📝 src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml (+167 -194)
📝 src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw (+34 -28)

📄 Description

This PR performs a large overall polish of the color schemes page:

  • Ensures keyboard navigation is holistically improved (i.e. fully
    accessible, no lost focus, etc...)
  • Adds tooltips and automation properties to all controls
  • Redesigns the page according to @mdtauk's approved design
    (link).
    Note, there are some minor modifications to the design that were
    approved by @cinnamon-msft.
  • Automatically reflow's the color buttons when they do not fit in
    horizontal mode

Detailed Description of the Pull Request / Additional comments

  • Redesign
    • a data template was introduced to make color representation
      consistent and straightforward
    • ContentControl is used to hold a reference to the
      ColorTableEntry and represent it properly using the aforementioned
      data template.
    • The design is mainly a StackPanel holding two grids: color table &
      functional colors.
    • The color table is populated via code. After much thought, this
      seems to be the easiest way to correctly bind 16 controls that are
      very similar.
    • The functional colors are populated via XAML manually.
    • We need a grid to separate the text and the buttons. This allows for
      scenarios like "selection background is the longest string" to force
      the buttons and text to be aligned.
  • Reflow
    • A VisualStateManager uses an AdaptiveTrigger to change the
      orientation of the color tables' stack panel. The adaptive trigger
      was carefully calculated to align with the navigation view's
      breakpoint.
  • Keyboard Navigation
    • (a lesson from SettingContainer) ContentControl can be focused
      as opposed to the content inside of it. We don't want that, so we
      set IsTabStop to false on it. That basically fixes all of our
      keyboard navigation issues in this new design.
  • Automation Properties and ToolTips
    • As in my previous PRs, I can't seem to figure out how to bind to a
      control's automation property to its own tooltip. So I had to do
      this in the code and add a few x:Name around.

Validation Steps Performed

  • Manually tested...
    • tab navigation
    • accessibility insights
    • NVDA
    • changing color schemes updates color table
  • specific scenario:
    • change a color table color and a functional color
    • navigate to a different color scheme
    • navigate back to the first color scheme
    • if the colors persist, the changes were propagated to the settings model

References #8997 - Based on the work from @Chips1234
References #6800 - Settings UI Epic
Closes #8765 - Polish Color Schemes page
Closes #8899 - Automation Properties
Closes #8768 - Keyboard Navigation


🔄 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/9196 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 2/18/2021 **Status:** ✅ Merged **Merged:** 2/19/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/cazamor/sui/color-schemes-redesign` --- ### 📝 Commits (9) - [`164d84e`](https://github.com/microsoft/terminal/commit/164d84e3a340e8e7298b389b8536c9bc144a60e2) Redesign color schemes page - [`7b3f6d1`](https://github.com/microsoft/terminal/commit/7b3f6d1ad24be5e03885f9253fc612e2b2900bbb) redesign color table - [`e8ac4a7`](https://github.com/microsoft/terminal/commit/e8ac4a718809c285302bdc29bd2dc4882dd2fa16) add automatic reflow - [`1071c46`](https://github.com/microsoft/terminal/commit/1071c4683464829ae21d7188bf6cfabf9b5884ed) add tooltips and automation properties - [`ca6ec7a`](https://github.com/microsoft/terminal/commit/ca6ec7a8edfb71964ea723b787303f1c57743b1e) add remaining tooltips and automation properties - [`cf2ad59`](https://github.com/microsoft/terminal/commit/cf2ad59e16c38b773ec10117181f88eef7886acf) address Dustin's feedback - [`319b990`](https://github.com/microsoft/terminal/commit/319b990b36f1c525ac1c153021f7eccc27e62e6c) match adaptive trigger to navigation view trigger - [`293b336`](https://github.com/microsoft/terminal/commit/293b33669ca5d3376623b4b6052316423196edec) address Griese feedback - [`9db6633`](https://github.com/microsoft/terminal/commit/9db6633774b162448f34707543a7f9f6105b61e4) fix system color binding ### 📊 Changes **5 files changed** (+353 additions, -239 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsEditor/ColorSchemes.cpp` (+131 -11) 📝 `src/cascadia/TerminalSettingsEditor/ColorSchemes.h` (+9 -3) 📝 `src/cascadia/TerminalSettingsEditor/ColorSchemes.idl` (+12 -3) 📝 `src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml` (+167 -194) 📝 `src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw` (+34 -28) </details> ### 📄 Description This PR performs a large overall polish of the color schemes page: - Ensures keyboard navigation is holistically improved (i.e. fully accessible, no lost focus, etc...) - Adds tooltips and automation properties to all controls - Redesigns the page according to @mdtauk's approved design ([link](https://github.com/microsoft/terminal/pull/8997#issuecomment-771623842)). Note, there are some minor modifications to the design that were approved by @cinnamon-msft. - Automatically reflow's the color buttons when they do not fit in horizontal mode ## Detailed Description of the Pull Request / Additional comments - Redesign - a data template was introduced to make color representation consistent and straightforward - `ContentControl` is used to hold a reference to the `ColorTableEntry` and represent it properly using the aforementioned data template. - The design is mainly a StackPanel holding two grids: color table & functional colors. - The color table is populated via code. After much thought, this seems to be the easiest way to correctly bind 16 controls that are very similar. - The functional colors are populated via XAML manually. - We need a grid to separate the text and the buttons. This allows for scenarios like "selection background is the longest string" to force the buttons and text to be aligned. - Reflow - A `VisualStateManager` uses an `AdaptiveTrigger` to change the orientation of the color tables' stack panel. The adaptive trigger was carefully calculated to align with the navigation view's breakpoint. - Keyboard Navigation - (a lesson from `SettingContainer`) `ContentControl` can be focused as opposed to the content inside of it. We don't want that, so we set `IsTabStop` to false on it. That basically fixes all of our keyboard navigation issues in this new design. - Automation Properties and ToolTips - As in my previous PRs, I can't seem to figure out how to bind to a control's automation property to its own tooltip. So I had to do this in the code and add a few `x:Name` around. ## Validation Steps Performed - Manually tested... - tab navigation - accessibility insights - NVDA - changing color schemes updates color table - specific scenario: - change a color table color and a functional color - navigate to a different color scheme - navigate back to the first color scheme - if the colors persist, the changes were propagated to the settings model References #8997 - Based on the work from @Chips1234 References #6800 - Settings UI Epic Closes #8765 - Polish Color Schemes page Closes #8899 - Automation Properties Closes #8768 - Keyboard Navigation --- <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:22:06 +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#27460