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

Improve color name editorUnnecessary.foreground #51152

Closed
aeschli opened this issue Jun 5, 2018 · 6 comments
Closed

Improve color name editorUnnecessary.foreground #51152

aeschli opened this issue Jun 5, 2018 · 6 comments
Assignees
Labels
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Jun 5, 2018

editorUnnecessary.foreground got added as a new color.
My first thought was that this is the color of an unnecessary editor.

TypeScript calls the ranges unused spans, so I suggest we use unused, not unnecessary

  • editorUnusedCode.foreground
  • editor.unusedCodeForeground (similar to editor.lineHighlightBackground)
  • editor.unusedCodeForeground

We had some discussions in the ZRH standup that it should go along with future semantic highlights, but no proposal was made on what that would mean for the name.
@dbaeumer @jrieken @egamma

@wistcc
Copy link
Contributor

wistcc commented Jun 5, 2018

I would like to take this one if you guys think this is a good first issue. Seems like I just need to rename editorUnnecessary by editorUnused on these files:

  • /src/vs/editor/browser/widget/codeEditorWidget.ts
  • /src/vs/editor/common/model/intervalTree.ts
  • /src/vs/editor/common/services/modelServiceImpl.ts
  • /src/vs/editor/common/view/editorColorRegistry.ts

@mjbvz
Copy link
Collaborator

mjbvz commented Jun 6, 2018

Thanks @wistcc but this is not a good choice. Easy code change but we need to discuss the design of this feature more. For example, should we fade out code instead of changing it all to grey?

@mjbvz mjbvz added this to the June 2018 milestone Jun 6, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 6, 2018

Falls under #51104

@mjbvz mjbvz added the api label Jun 7, 2018
@mjbvz mjbvz closed this as completed in 94a4919 Jun 12, 2018
@reeddunkle
Copy link

@mjbvz I'm just getting up-to-speed on the change. Thanks for adding the key editorUnnecessaryCode.opacity to control the alpha variable for the fadeout.

Is there still an option to change the color or has that been removed?

@mjbvz
Copy link
Collaborator

mjbvz commented Jul 9, 2018

No, this option was been removed when we finalized the unused variable api

@Izhaki
Copy link

Izhaki commented Jul 12, 2018

@mjbvz

This is pretty bad... we used to have unused code highlighted in yellow so it is crystal clear (fading is not enough as some themes use light grey for comments etc.)

image

Now with 1.25.0, this feature seem to be broken (no editorUnnecessaryCode.opacity/editor.showUnused combination seems to have an effect).

Related: #51420

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants
@Izhaki @wistcc @aeschli @reeddunkle @mjbvz and others