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

[Test item] Try using the new diagnostics tag API #52218

Closed
2 tasks done
mjbvz opened this issue Jun 18, 2018 · 3 comments
Closed
2 tasks done

[Test item] Try using the new diagnostics tag API #52218

mjbvz opened this issue Jun 18, 2018 · 3 comments

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jun 18, 2018

Test for #51104

Complexity: 3

Summary
#51104 introduces a new tags field on diagnostics. This field is used to add additional metadata about the diagnostic. We currently use it to mark unnecessary code so that it can be rendered as faded out.

Testing
Try using the new tags api extension that contributes diagnostics. Things to try:

  • Make sure the faded out rendering plays nicely with all diagnostic severities. The fading out should disable the ... on suggestion diagnostics but not disable squiggles on errors and warnings.
  • Make sure overlapping diagnostics are rendered correctly.
  • Make sure you can control the fading out level with "editorUnnecessaryCode.opacity" and "editorUnnecessaryCode.border" (for high contrast) as described in the api documentation
@mjbvz mjbvz added this to the June 2018 milestone Jun 18, 2018
@mjbvz mjbvz changed the title Try using the new diagnostics tag API [Test item] Try using the new diagnostics tag API Jun 18, 2018
@benjaminjackman
Copy link

Is there any way to still use the previous behavior of graying out the code instead of fading it and keeping the syntax color? I understand from #51104 that a lot of folks like this version. However having tried it out in insiders, I find the previous grayed out version to be much easier to scan for. (I tried the borders setting and it was too noisy).

@mjbvz
Copy link
Contributor Author

mjbvz commented Jun 20, 2018

No, no current plans for an option to revert to the old behavior. The new effect is more subtile but does retain useful coloring information in the faded out spans

@chrmarti
Copy link
Contributor

@mjbvz What do you mean by fading out should disable the ...? When I overlay a hint with a second 'unnecessary' warning/error the ... is still shown. When I have an 'unnecessary' hint, nothing is shown. Is that the expected behavior?

@chrmarti chrmarti removed their assignment Jun 27, 2018
benjaminjackman added a commit to benjaminjackman/vscode that referenced this issue Jul 4, 2018
This commit allows users to set a color for unused code which had been an
unconfigurable behavior (defaulting to a shade of gray) until microsoft#51104 / microsoft#52218 when
it was replaced with setting that allows for either decreasing the unused
token's opacity while preserving its color and/or setting the color of
a 2px dashed border that "underlines" the unused token.

The previous behavior avoided some contrast issues introduced by microsoft#51104 / microsoft#52218
when reducing the opacity of some syntax colors that were already at
or just over the low-contrast frontier into squintland, the unlegible
country, a place no programmer should be forced gaze.

Conversely, tokens that don't contrast enough with themselves won't scan
well when the programmer is looking for unused tokens.
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants