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

Dark mode support #102

Merged
merged 4 commits into from Mar 18, 2019
Merged

Dark mode support #102

merged 4 commits into from Mar 18, 2019

Conversation

draganescu
Copy link
Collaborator

This PR adds support for #49

The package.json file has a new directive that instructs Electron to allow dark mode when the app is packaged, so the chrome respects the OS setting.

The election-runner.js script has some logic that relays to the rendered the current system setting about dark mode and the changes to it when the user switches in System Settings.

public/index.html Outdated Show resolved Hide resolved
src/electron-runner.js Outdated Show resolved Hide resolved
src/electron-runner.js Outdated Show resolved Hide resolved
@draganescu draganescu force-pushed the update/dark-mode-support branch 2 times, most recently from 9a0e7e7 to 128343f Compare March 18, 2019 01:08
talldan
talldan previously approved these changes Mar 18, 2019
Copy link
Collaborator

@talldan talldan left a comment

Choose a reason for hiding this comment

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

LGTM!

@talldan talldan added the [Type] Enhancement New feature or request label Mar 18, 2019
@noisysocks noisysocks mentioned this pull request Mar 18, 2019
@draganescu draganescu force-pushed the update/dark-mode-support branch 2 times, most recently from 86534eb to f813c29 Compare March 18, 2019 03:53
@pento
Copy link
Owner

pento commented Mar 18, 2019

Here's what I noticed while using dark mode:

  • Hovering the preferences button makes it very bright.
  • Link colour contrast on the About page is too low.
  • Link colour contrast for the http://localhost:9999 link is too low.

@pento
Copy link
Owner

pento commented Mar 18, 2019

One more thing: the little notch pointing at the (W) logo is still white.

@@ -94,6 +94,28 @@ function createWindow() {
}
} );

if ( process.platform === 'darwin' ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We probably want to have the theme-light class apply by default so that non-Mac clients have the light theme.

}
.theme-dark & {
color: $light-gray-200;
border-bottom: 1px solid $dark-gray-400;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This border doesn't seem to be visible

src/components/pages/style.scss Show resolved Hide resolved
text-decoration: underline;
cursor: pointer;
background: none;
display: block;
font-size: inherit;
margin: 10px 0;
padding: 0;
.theme-light & {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might also need hover/focus/visited styles

}
.theme-dark & {
color: $blue-medium-200;
border-bottom: 1px solid $dark-gray-400;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This border doesn't seem to be visible, maybe the colors are around the wrong way.

@@ -1,5 +1,5 @@
@import "../node_modules/@wordpress/components/build-style/style.css";

@import "./_colors.scss";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like this could be removed.

@draganescu draganescu merged commit 9e45550 into master Mar 18, 2019
@draganescu draganescu deleted the update/dark-mode-support branch March 18, 2019 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants