-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
VSCE: Automate rendering of user's color theme #29704
Comments
@tjkandala Just wanted to follow up on your question from the planning meeting. This issue covers essentially spans all colors on the VSCE, which includes syntax highlighting. At the moment, it seems to be a hybrid of pulling in a user's color theme and Sourcegraph colors (definitely my bad here, my designs promoted this). I think the most natural state for the extension would be to pull in the user's color theme in to all elements: syntax highlighting, typography, background colors, etc. Please let me know if you'd like me to clarify further! |
@jjinnii Got it! I believe this will basically entail finding VS Code CSS variables to use in place of our highlighting styles |
@tjkandala Perfect! Do let me know when this issue is ready for review -- I'd like to test with a few different themes, just to make sure that for the most popular themes in VS Code at least, our extension looks sleek and polished with how/what CSS variables we're pulling in for the different components :) |
@abeatrix That looks a lot better! Could you please test out a few other default themes with your latest version to make sure nothing stands out? Thank you! |
For syntax highlighting, it looks like currently access to VS Code built-in highlighting color is not available: microsoft/vscode#56356 |
This is currently blocked by the limitation of the VS Code API. A potential temporary workaround I can think of would be adding an option for users to provide the extension with their color theme. |
Could I get some clarification on what "providing the extension with their color theme" means? Namely:
|
The user would first need to generate a color theme file using the |
Moving this to |
Thanks @abeatrix! Just to refresh my memory:
And we are blocked because it's not possible for us to pull in theme colors through the API, and the only solution would be for a user to follow some manual steps and save as a Sourcegraph extension setting? If above is correct, what would you say our coverage of themes on VS Code is? e.g. we have the top 20 themes hard coded. |
That's correct. [Here](Material Theme Palenight High Contrast) you can see how we hard code the color for one of the themes we support.
That's correct. And the color list would be very long so I am unsure where would be an appropriate place to save it Here is a list of the themes we have vetted so far: https://github.com/sourcegraph/sourcegraph/blob/main/client/vscode/src/webview/theming/highlight.scss#L180-L202 (Solarized and Material Theme Palenight High Contrast are missing in the list, I will add them in my next PR) |
Thanks for the clarification @abeatrix ! I changed the name of the issue to be a bit clearer. If we no see no feasible technical way to implement this, I think we can close this issue. 😄 We've received no feedback yet (besides positive ones!) on user color themes, so I think we can create a new issue in the future when we know of any specific user problem. |
The expected behavior of the VSCE is to pull in a user's color theme palette for all UI elements, including text color, background color for containers, icon colors, etc. This allows the extension to feel more "native' and integrated to VS Code extension and prevents scenarios in which there is a harsh contrast btw a user's default color palette and switching to our extension.
It's important that we check with multiple color palettes and ensure that we are pulling in these color themes in an effective and accessible way -- this will define at a glance how the extension looks to a user.
The text was updated successfully, but these errors were encountered: