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

Command Palette key bindings are unreadable in High Contrast mode #6892

Closed
DHowett opened this issue Jul 13, 2020 · 3 comments · Fixed by #6910
Closed

Command Palette key bindings are unreadable in High Contrast mode #6892

DHowett opened this issue Jul 13, 2020 · 3 comments · Fixed by #6910
Labels
Area-Accessibility Issues related to accessibility Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@DHowett
Copy link
Member

DHowett commented Jul 13, 2020

image

@DHowett DHowett added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Jul 13, 2020
@DHowett DHowett added this to the Terminal v1.3 milestone Jul 13, 2020
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jul 13, 2020
@DHowett DHowett added the Area-Accessibility Issues related to accessibility label Jul 13, 2020
@zadjii-msft
Copy link
Member

Would you look at that, they sure are. Probably regressed after #6833, but hey, that's okay!

@jtippet might have an idea for the best way to fix this. I'm sure it's as easy as "make the text black in HC mode"

@zadjii-msft zadjii-msft added Priority-1 A description (P1) and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 13, 2020
@jtippet
Copy link
Contributor

jtippet commented Jul 13, 2020

Yeah I didn't know that UI existed, so I didn't even test it. I've now reverse-engineered how to launch it, and can repro the bug. It looks like the problem is that that UI element's background is using a foreground brush:

<!-- CommandPalette.xml -->
<Border Background="{ThemeResource SystemControlForegroundBaseLowBrush}">
  <TextBlock Foreground="{ThemeResource SystemControlForegroundBaseMediumBrush}"/>
</Border>

I claim that putting a foreground brush into a background attribute should generally be viewed as a datatype mismatch, or at least some sort of red flag.

If nobody beats me to it, I'll cook up a fix tonight (PST) after my day job. I am inclined to remove the backdrop altogether when in HC mode. That'd keep it in line with how MUX does menus:

image

@ghost ghost added the In-PR This issue has a related PR label Jul 14, 2020
@ghost ghost closed this as completed in #6910 Jul 14, 2020
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Jul 14, 2020
ghost pushed a commit that referenced this issue Jul 14, 2020
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
Update the Palette to be readable under High Contrast mode

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References
Regressed in #6833

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [X] Closes #6892
* [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [X] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #6892

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
I pulled the styling of the KeyChord text into a Style, so we can give it a different style under High Contrast.  Under HC, I just left all the colors at their default, so ListView can do its thing.  (IMHO, the HC style now looks better than the non-HC mode, but maybe I'm biased ;) )

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
| | Old | New |
|---|:---:|:---:|
| Light | ![light](https://user-images.githubusercontent.com/10259764/87398203-6b8f9a80-c56a-11ea-99d0-2eeefcfea269.png) | ![newlight](https://user-images.githubusercontent.com/10259764/87399212-e3aa9000-c56b-11ea-9e94-c8fae8825cd1.png) |
| Dark | ![dark](https://user-images.githubusercontent.com/10259764/87398269-819d5b00-c56a-11ea-9180-5c6ec1071b95.png) | ![newdark](https://user-images.githubusercontent.com/10259764/87399227-ead19e00-c56b-11ea-996d-ad52bc2dcbf3.png) |
| HC White | ![oldwhite](https://user-images.githubusercontent.com/10259764/87398320-92e66780-c56a-11ea-9d52-e2f6e31ae487.png) | ![newwhite](https://user-images.githubusercontent.com/10259764/87398340-98dc4880-c56a-11ea-87e2-ed257ad89c4a.png) |
| HC Black | ![oldblack](https://user-images.githubusercontent.com/10259764/87398357-9f6ac000-c56a-11ea-848c-1ccef6a65442.png) | ![newblack](https://user-images.githubusercontent.com/10259764/87398370-a396dd80-c56a-11ea-9540-8aa9bb934791.png) |
@ghost
Copy link

ghost commented Jul 22, 2020

🎉This issue was addressed in #6910, which has now been successfully released as Windows Terminal Preview v1.2.2022.0.:tada:

Handy links:

This issue 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-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants