Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[High Contrast] Fix red SUI background #13083

Merged
1 commit merged into from
May 11, 2022
Merged

Conversation

carlos-zamora
Copy link
Member

@carlos-zamora carlos-zamora commented May 11, 2022

Fixes the SUI background being red in high contrast mode. The issue was
that SolidBackgroundFillColorTertiary purposefully has a bad High
Contrast color1.

The fix was to be explicit in the theme resources so that
SolidBackgroundFillColorTertiary is used in light and dark mode, but
the standard high contrast one is used in high contrast mode. Since the
page is the top-level XAML element in the Editor project, I had to
introduce this in the App.xaml resources so that the page can find the
theme resource.

Closes #13065
Closes #13070

Footnotes

  1. https://github.com/microsoft/microsoft-ui-xaml/blob/40df43a61c013a6763f47dd7d89ed54f35999340/dev/CommonStyles/Common_themeresources_any.xaml#L650-L651

@ghost ghost added Area-Accessibility Issues related to accessibility Area-SettingsUI Anything specific to the SUI Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. labels May 11, 2022
@carlos-zamora carlos-zamora added zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. and removed Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Accessibility Issues related to accessibility Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Area-SettingsUI Anything specific to the SUI zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. labels May 11, 2022
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

Thanks! Can you go through and evaluate all of the settings pages for HC stuff as well? I know you probably did that already, but just in case. :)

@DHowett
Copy link
Member

DHowett commented May 11, 2022

@carlos-zamora FYI Mike is comfortable with us porting the new Win11 UI changes in the SUI and the Search/Command Palette if the HC things are fixed. Are you also comfortable with that?

@DHowett
Copy link
Member

DHowett commented May 11, 2022

Pulled from body: 11.169:1 contrast ratio is acceptable

@ghost ghost added Area-Accessibility Issues related to accessibility Area-SettingsUI Anything specific to the SUI Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. labels May 11, 2022
@carlos-zamora
Copy link
Member Author

@DHowett

@DHowett
Copy link
Member

DHowett commented May 11, 2022

@msftbot merge this in 2 minutes

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label May 11, 2022
@ghost
Copy link

ghost commented May 11, 2022

Hello @DHowett!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Wed, 11 May 2022 18:09:45 GMT, which is in 2 minutes

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@DHowett DHowett added the Needs-Second It's a PR that needs another sign-off label May 11, 2022
@ghost ghost requested review from zadjii-msft, PankajBhojwani and lhecker May 11, 2022 18:08
@ghost ghost merged commit a657cb0 into main May 11, 2022
@ghost ghost deleted the dev/cazamor/bugfix-high-contrast branch May 11, 2022 18:31
carlos-zamora added a commit that referenced this pull request May 12, 2022
Fixes the SUI background being red in high contrast mode. The issue was
that `SolidBackgroundFillColorTertiary` purposefully has a bad High
Contrast color[^1].

The fix was to be explicit in the theme resources so that
`SolidBackgroundFillColorTertiary` is used in light and dark mode, but
the standard high contrast one is used in high contrast mode. Since the
page is the top-level XAML element in the Editor project, I had to
introduce this in the App.xaml resources so that the page can find the
theme resource.

Closes #13065
Closes #13070

[^1]: https://github.com/microsoft/microsoft-ui-xaml/blob/40df43a61c013a6763f47dd7d89ed54f35999340/dev/CommonStyles/Common_themeresources_any.xaml#L650-L651

(cherry picked from commit a657cb0)
Service-Card-Id: 81805351
Service-Version: 1.13
zadjii-msft added a commit that referenced this pull request May 23, 2022
ThemeResources are a persistent pain.

Regressed in #13083. See also #12775 et. al.

We can't just put those here though as StaticResources, because XAML will evaluate their values when the App is first loaded, and we'll always use the value from the OS theme, regarless of the requested theme. Kinda the same thing we've had to do with TabViewBackground in the past.

* [x] Fixes something we noticed right before shipping
ghost pushed a commit that referenced this pull request May 23, 2022
ThemeResources are a persistent pain.

Regressed in #13083. See also #12775 et. al.

We can't just put those here though as StaticResources, because XAML will evaluate their values when the App is first loaded, and we'll always use the value from the OS theme, regarless of the requested theme. Kinda the same thing we've had to do with TabViewBackground in the past.

* [x] Fixes something we noticed right before shipping
DHowett pushed a commit that referenced this pull request May 23, 2022
ThemeResources are a persistent pain.

Regressed in #13083. See also #12775 et. al.

We can't just put those here though as StaticResources, because XAML will evaluate their values when the App is first loaded, and we'll always use the value from the OS theme, regarless of the requested theme. Kinda the same thing we've had to do with TabViewBackground in the past.

* [x] Fixes something we noticed right before shipping

(cherry picked from commit bb03b00)
Service-Card-Id: 82303612
Service-Version: 1.14
DHowett pushed a commit that referenced this pull request May 23, 2022
ThemeResources are a persistent pain.

Regressed in #13083. See also #12775 et. al.

We can't just put those here though as StaticResources, because XAML will evaluate their values when the App is first loaded, and we'll always use the value from the OS theme, regarless of the requested theme. Kinda the same thing we've had to do with TabViewBackground in the past.

* [x] Fixes something we noticed right before shipping

(cherry picked from commit bb03b00)
Service-Card-Id: 82303611
Service-Version: 1.13
@ghost
Copy link

ghost commented May 24, 2022

🎉Windows Terminal v1.13.1143 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented May 24, 2022

🎉Windows Terminal Preview v1.14.143 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Issues related to accessibility Area-SettingsUI Anything specific to the SUI AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Second It's a PR that needs another sign-off Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree.
Projects
None yet
3 participants