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

Update GitHub Dark + test GitHub Dimmed #98

Merged
merged 25 commits into from
Jan 20, 2021
Merged

Update GitHub Dark + test GitHub Dimmed #98

merged 25 commits into from
Jan 20, 2021

Conversation

simurai
Copy link
Contributor

@simurai simurai commented Dec 11, 2020

github.com now has an official dark mode. To keep this theme close to github.com, this PR does the following:

Nice to have:

  • Automatically convert all rgba() colors from primer/primitives to #rrggbbaa. VS Code doesn't allow rgba() and falls back to red. Currently it uses this workaround but that isn't a great long-term solution.

simurai and others added 9 commits December 10, 2020 16:24
The plan is:

1. Rename "GitHub Dark" to "GitHub SpaceGray"
2. Use new dark colors for "GitHub Dark"
Not sure if this is a better name, but it relates to what VS Code calls "uiTheme".
@lutzroeder
Copy link

For names, what about GitHub Gray instead of GitHub SpaceGray? The shorter name would be more consistent with the Light and Dark names which are short as well.

@lutzroeder
Copy link

The activity bar in the GitHub Dark screenshot uses the gray color. Should it switch to the new dark color as well?

@simurai
Copy link
Contributor Author

simurai commented Dec 11, 2020

For names, what about GitHub Gray instead of GitHub SpaceGray? The shorter name would be more consistent with the Light and Dark names which are short as well.

Yeah, GitHub Gray might be a good choice. 👍

The activity bar in the GitHub Dark screenshot uses the gray color. Should it switch to the new dark color as well?

Yes, right. I just updated the screenshots. Might still need some more tweaking.

@simurai simurai marked this pull request as ready for review December 14, 2020 08:10
@mazhengcn
Copy link

Something off the topic but I just wonder what is icon theme in the screenshot? @simurai

Thanks.

@simurai
Copy link
Contributor Author

simurai commented Dec 16, 2020

@mazhengcn Something off the topic but I just wonder what is icon theme in the screenshot?

It's the City Lights Icon package. It has an option where you can make the icons monochrome. Harder to differentiate, but a bit calmer. 😄

@mazhengcn
Copy link

@mazhengcn Something off the topic but I just wonder what is icon theme in the screenshot?

It's the City Lights Icon package. It has an option where you can make the icons monochrome. Harder to differentiate, but a bit calmer. 😄

Thanks!

@keremciu
Copy link
Contributor

I had the idea of seeing same on browser and vscode, thanks for bringing consistency here, hope it would be merged soon 💯

@keremciu
Copy link
Contributor

this PR solves many consistency problems but I wanted to give feedback while I already started to use this one.

I put an examle here for this file: https://github.com/keremciu/house-of-decks/blob/ws-implement/client/src/Components/Button.js

I could try help if it's possible to make this reach and JavaScript implementation more consistent

diff

@simurai simurai changed the title Update GitHub Dark to match github.com Update GitHub Dark theme Dec 17, 2020
@simurai simurai changed the title Update GitHub Dark theme Update GitHub Dark to match github.com Dec 17, 2020
@tejasag
Copy link

tejasag commented Dec 25, 2020

I wanted to ask if the theme is synced with the official github dark mode, and if not, is there any eta?
Looking forward to it a lot! (:

@nonameolsson
Copy link

Looking forward to this update. Is there anything we can help with?

@keremciu
Copy link
Contributor

keremciu commented Jan 3, 2021

I tried to update just by looking for JavaScript react highlighting differences.

keremciu@679cec8#diff-09ce39aad75bba2010ea6e7fb785187ec76b341be11d5f7f2cc6b83839a1b728

don't know if this is a sustainable way to make changes while I have no idea what GitHub uses for the interface :)

I can confirm that my react code highlighting works consistent with this change, it can be improved of course. if someone can help to try it out, I can go deeper :)

@simurai
Copy link
Contributor Author

simurai commented Jan 4, 2021

@tejasag, @nonameolsson, @Gameghostify It might will take a bit longer since we're still trying to improve the "dimmed" version.

But you can already test it with:

  1. Download github-vscode-theme-1.1.5.vsix.zip
  2. Unzip
  3. Following the Install from a VSIX guide to install the VSIX.

Screen Shot 2021-01-04 at 11 08 04

Eventually I would delete it again since it won't get any updates.

@larxx
Copy link

larxx commented Jan 4, 2021

@tejasag, @nonameolsson, @Gameghostify It might will take a bit longer since we're still trying to improve the "dimmed" version.

But you can already test it with:

  1. Download github-vscode-theme-1.1.5.vsix.zip
  2. Unzip
  3. Following the Install from a VSIX guide to install the VSIX.

Screen Shot 2021-01-04 at 11 08 04

Eventually I would delete it again since it won't get any updates.

I just tried this one out and it looks so damn good! This theme is gonna take over 💯. Thank you so much for your hard work 🙏

@simurai
Copy link
Contributor Author

simurai commented Jan 4, 2021

@keremciu I tried to update just by looking for JavaScript react highlighting differences.

keremciu@679cec8#diff-09ce39aad75bba2010ea6e7fb785187ec76b341be11d5f7f2cc6b83839a1b728

Added it to this PR #100 including a couple screenshots to compare. I can spot changes to these "JSX tabs" like <StyledButton>, which is great. 👍 We can merge that after merging this PR.

@kherock
Copy link

kherock commented Jan 4, 2021

@tejasag, @nonameolsson, @Gameghostify It might will take a bit longer since we're still trying to improve the "dimmed" version.

But you can already test it with:

  1. Download github-vscode-theme-1.1.5.vsix.zip
  2. Unzip
  3. Following the Install from a VSIX guide to install the VSIX.

This build seems to work well except that additions are highlighted in red (and deletions in green) in the diff editor! It doesn't seem like a bug in the @primer/primitives build being, and the light theme has the correct colors. found the issue in my next comment below.

src/theme.js Outdated
"editorGutter.deletedBackground" : color.diff.deletion.border,

"diffEditor.insertedTextBackground": color.diff.addition.bg,
"diffEditor.removedTextBackground": color.diff.deletion.bg,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These colors are stored as rgba() in the dark themes in @primer/primitives, but VSCode needs them to be in #RRGGBBAA form here. My VSCode defaults them to a very bright and opaque red or green on the dark modes.

Copy link
Contributor Author

@simurai simurai Jan 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Yes, seems VS Code only allows the #RRGGBBAA format for transparency. When using rgba() it defaults to red:

Screen Shot 2021-01-05 at 16 33 35

Hmm.. seems that rgba() has slightly better browser support, so we might still wanna keep using it for @primer/primitives. For the VSCode theme we could try to convert it to #RRGGBBAA.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kherock thanks for reporting this! Was just about to report it myself :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it's currently fixed by wrapping the @primer/primitives color with a chroma(...).hex() that supports #RRGGBBAA:

Screen Shot 2021-01-05 at 16 38 27

But it could break anytime if @primer/primitives uses rgba() for any of the other colors. Would be better if we could convert all colors before generating the theme.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure if this Is the same issue, but the same thing occurs on the git popup in the editor.
Screen Shot 2021-01-06 at 1 07 59 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffgennari Yes.. thanks for spotting this. Should be fixed with 66bc8f0.

Screen Shot 2021-01-07 at 11 27 26

@simurai simurai changed the title Update GitHub Dark to match github.com Update GitHub Dark + add GitHub Dimmed Jan 8, 2021
@simurai simurai marked this pull request as draft January 8, 2021 08:57
@simurai simurai changed the title Update GitHub Dark + add GitHub Dimmed Add GitHub Dimmed Jan 20, 2021
@simurai simurai merged commit 66bc8f0 into master Jan 20, 2021
@simurai simurai deleted the dark-and-spacegray branch January 20, 2021 03:16
@simurai simurai restored the dark-and-spacegray branch January 20, 2021 03:49
@simurai simurai deleted the dark-and-spacegray branch January 20, 2021 03:50
@simurai simurai changed the title Add GitHub Dimmed Update GitHub Dark + test GitHub Dimmed Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants