-
Notifications
You must be signed in to change notification settings - Fork 30k
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
[themes][semantic] default themes: new constant color #95346
Comments
Hey @aeschli just saw this in today's insiders. For JS/TS, I feel that the new color for constants changes the character of the dark theme. It makes it feel brighter (when I first saw it, I actually thought our colorization was broken). One specific nit I have is that constants now use the same color as punctuation which makes code less legible: Trying to match VS is a good sounding goal but I find the impact of this little change to be quite drastic (more drastic than enabling semantic highlighting in the first place). And honestly, we have a whole lot of users who are using the default VS Code theme and don't care what Visual Studio is doing Maybe there's a compromise that won't be quite as jarring when users upgrade but still lets us convey if something is a constant or not? |
I thought it was a bug and was about to report it. It feels like the color that should be there just disappeared. |
I fully understand. It also took me a while to like it. Theme changes are always very controversial.
@misolori Your thoughts? |
@aeschli: Would it be possible to use something in between cyan and white? Or go darker? |
It's a bit strange to close opened issue as duplicate of this and expect feedback on closed issue. Could you have an open one for feedback? I don't have any preference for color, however default "white" doesn't have any as with plain text and would be nice to have something else.
I don't think that knowledge that some variable/property is constant is more useful to discard type of data in variable as was implemented for JS/TS. Previous behavior with value type should have greater priority than generic constant. |
Reopened for feedback |
I'm not finding this particularly useful, especially on properties. You have to know something about the kind of immutability being used in order to determine if/when a property can be written to. Unfortunately, some extensions/grammars do not respect the subtle distinctions. For example, in TypeScript, while the This is also made worse if a language server is inconsistent in its semantic highlighting. Again, from TypeScript: class A {
public readonly roField = 1;
// Without a setter, this should be read-only too, especially since it
// could also implement an abstract readonly field from an interface.
public get roProperty(): number { return 1; }
public foo(): number {
return this.roField /* white */ + this.roProperty /* light blue */;
}
} Another problem is that enum members aren't easily distinguishable in code anymore. This is mainly because the light green color was replaced and isn't being used on them or the enum identifier. It would be a lot better if the enum identifier got that color by default now, which would also be consistent with VS2019 as well. That said, I would like to see the default theme be a little closer to VS2019. Another alternative could be to reduce the change to just local constants (if possible, pending other issues) and enum members (which are never ambiguous because all members are always |
I also thought this was a bug when I saw it. I agree with @IllusionMH, my JS team also uses const for everything and now I have a lot of white text in my dark theme. It just feels like part of the highlighting isn't working or that the variable i'm using doesn't exist. |
Version: 1.45.0-insider I am a user of It is difficult to distinguish it from the color of comments. 1.44.2: Insiders: [Edit] The color, |
@misolori see above, comment on the contrast of the new color. |
@tamuratak thanks for the feedback, our accessibility color contrast goals are to meet WCAG AA so you will find this throughout all of our themes. The new const color meets WCAG AA at 4.6:1, see below. cc @isidorn |
To verify: |
Can you please remove it? Or at least make it toggleable. I thought this was a bug because it was so ugly lol |
I loved my yellow enums! Bring them back! 😢 |
@gnaeus Not with semantic highlighting enabled... |
@aeschli, why console.log changes color, when this option is enabled? |
@aeschli no I didn't disable semantic highlighting. My combination of flags: "editor.semanticHighlighting.enabled": true,
"editor.semanticTokenColorCustomizations": {
"enabled": false,
}, |
@gnaeus enums should be yellow :) |
Can someone return back the original color for constants or give a decent workaround? I tried using this
to return to old behavior but it only works if I set Also the workaround makes everything blue which now clashes with functional component names and so on |
To get the old colors back you need to add the following to the settings:
|
Thank you for a quick response. It worked |
Just spend 30 minutes trying to fix this bug by reopening VSC then reinstalling it because I was sure that my coloring was broken. |
Thank you! It is unbelievable that WE as users have to make our own fixes around this new "feature". Though you guys at Microsoft would listen to us... 😒 |
Holy moly, I have color blindness, and after recent update, I thought it some kind of bug. You should change color schemes with care. Reverting to old style |
Exactly. I'm color blind too, so that's why I have major problem with this. I guess this feature hasn't been consulted with UX and hasn't been tested. |
Leaving a comment here just for feedback. I feel a little too picky about this, but I spent more than an hour trying to figure out what was wrong with the const coloring. I thought it was a bug or some intrusive extension messing up my settings. Thanks for the "solution"! |
Spent couple hours today reinstalling vscode, was sure its a bug. Had to go with color customization fix mentioned above to revert it back to normal colors. Why would you add such "features" that break normal workflow for so many people? I'm wondering how many hours collectively developers who use vscode have wasted trying to work it around back to normal. |
See #97373 for the discussion about improving the color. |
This is awesome. I love you man. I was going nuts with the new coloring |
Well, I'm not color blind but I still find the new colors much harder to read than the old ones. The "WCAG" argument is a joke, are you really putting the algorithm above real users feedback? |
The issues with this:
|
Dark+ / Light +
Use the default color for constant variables.
The text was updated successfully, but these errors were encountered: