Skip to content

Sample App: Sample code errors are hard to read #3545

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

Closed
1 of 2 tasks
marcelwgn opened this issue Oct 23, 2020 · 5 comments · Fixed by #3588
Closed
1 of 2 tasks

Sample App: Sample code errors are hard to read #3545

marcelwgn opened this issue Oct 23, 2020 · 5 comments · Fixed by #3588
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior Completed 🔥 good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities sample app 🖼
Milestone

Comments

@marcelwgn
Copy link
Contributor

marcelwgn commented Oct 23, 2020

Describe the bug

A clear and concise description of what the bug is.

Errors in the XAML Sample are hard to read as the background-red does not work well with text:

Image showing hard to read text

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

  • Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)

Steps to reproduce the behavior:

  1. Open Sample App
  2. Enter faulty XAML

Expected behavior

Text should be easy to read.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

NuGet Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [x] Insider Build (build number: 20236)

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [ ] 2019 (version: ) 
- [ ] 2019 Preview (version: )

Additional context

Add any other context about the problem here.

@marcelwgn marcelwgn added the bug 🐛 An unexpected issue that highlights incorrect behavior label Oct 23, 2020
@ghost ghost added the needs triage 🔍 label Oct 23, 2020
@ghost
Copy link

ghost commented Oct 23, 2020

Hello chingucoding, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@Kyaa-dost
Copy link
Contributor

@chingucoding Thanks for highlighting the issue. Are you going to be creating a PR for this?

@Kyaa-dost Kyaa-dost added this to the 7.0 milestone Oct 26, 2020
@marcelwgn
Copy link
Contributor Author

Unfortunately, I don't have enough knowledge of the markdown renderer, so I'll gladly leave this issue to someone who is familiar with that.

@Kyaa-dost
Copy link
Contributor

@chingucoding No worries. Will see if any other developers can pick this up.

@Kyaa-dost Kyaa-dost added the help wanted Issues identified as good community contribution opportunities label Oct 26, 2020
@michael-hawker
Copy link
Member

This color is defined by the lines of code here:

https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/a47305cbaea5cfeb8ecdfd8c74e2570b86ed26e2/Microsoft.Toolkit.Uwp.SampleApp/Controls/XamlCodeEditor.xaml.cs#L124-L127

If I remember the contrast may be alright on light theme, but we probably need to make this theme aware using our ThemeListener.

@michael-hawker michael-hawker added the good first issue Issues identified as good for first-time contributors label Oct 27, 2020
winston-de added a commit to winston-de/WindowsCommunityToolkit that referenced this issue Nov 30, 2020
@ghost ghost added the In-PR 🚀 label Nov 30, 2020
@ghost ghost closed this as completed in #3588 Dec 5, 2020
@ghost ghost removed the In-PR 🚀 label Dec 5, 2020
ghost pushed a commit that referenced this issue Dec 5, 2020
<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 -->

## Fixes #3545 
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->

<!-- Add a brief overview here of the feature/bug & fix. -->
Adds a theme listener field and a read only property that returns the theme-specific error background color to the sample app's Xaml code editor.

## PR Type
What kind of change does this PR introduce?
<!-- Please uncomment one or more that apply to this PR. -->

Bugfix
<!-- - Feature -->
<!-- - Code style update (formatting) -->
<!-- - Refactoring (no functional changes, no api changes) -->
<!-- - Build or CI related changes -->
<!-- - Documentation content changes -->
Sample app changes 
<!-- - Other... Please describe: -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Quoting from #3545 
> Errors in the XAML Sample are hard to read as the background-red does not work well with text:
> ![](https://user-images.githubusercontent.com/16122379/97060991-92139780-1595-11eb-9e26-a9e81e28dda8.png)

## What is the new behavior?
<!-- Describe how was this issue resolved or changed? -->
A different text background is now displayed when dark theme is enabled, making it more readable.
![image](https://user-images.githubusercontent.com/59544401/100564314-8f335300-3275-11eb-8fe0-68b1ac91c6d3.png)

## PR Checklist

Please check if your PR fulfills the following requirements:

 - [x] Tested code with current supported SDKs
 - [N/A] Pull Request has been submitted to the documentation repository instructions. Link:
 - [x] Sample in sample app has been added / updated (for bug fixes / features)
      - [N/A] Icon has been created (if new sample) following the Thumbnail Style Guide and templates
 - [N/A] Tests for the changes have been added (for bug fixes / features) (if applicable)
 - [N/A] Header has been added to all new source files (run build/UpdateHeaders.bat) (None added)
 - [x] Contains NO breaking changes

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. 
     Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. -->
@ghost ghost added the Completed 🔥 label Dec 5, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Feb 3, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior Completed 🔥 good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities sample app 🖼
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants