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

[GSoD] docs: revised dark mode feature page #26187

Merged
merged 4 commits into from Nov 2, 2020

Conversation

bandantonio
Copy link
Contributor

@bandantonio bandantonio commented Oct 27, 2020

Description of Change

Revised dark mode feature page, added example that demonstrates the feature, added gif representing the code sample

Checklist

Release Notes

Notes: Revised dark mode feature page, added example that demonstrates the feature, added gif representing the code sample

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 27, 2020
@erickzhao erickzhao requested a review from a team October 27, 2020 16:51
Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

If we're renaming this guide do we need to add a redirect from the old URL on the website?

Copy link
Member

@erickzhao erickzhao left a comment

Choose a reason for hiding this comment

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

General comment: I believe this also works on Windows, so it's important to scope macOS-specific advice to their own subsection.

To other reviewers: for reference, here's a gist link to the original demo I gave Anton: https://gist.github.com/151c3804bb771807c38fc4f0c8bc74bf

docs/api/system-preferences.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode-guide.md Outdated Show resolved Hide resolved
Comment on lines 5 to 19
### macOS

In macOS 10.14 Mojave, Apple introduced a new [system-wide dark mode][system-wide-dark-mode]
for all macOS computers. If your Electron app has a dark mode, you can make it
follow the system-wide dark mode setting using
[the `nativeTheme` api](../api/native-theme.md).

In macOS 10.15 Catalina, Apple introduced a new "automatic" dark mode option
for all macOS computers. In order for the `nativeTheme.shouldUseDarkColors` and
`Tray` APIs to work correctly in this mode on Catalina, you need to either have
`NSRequiresAquaSystemAppearance` set to `false` in your `Info.plist` file, or
use Electron `>=7.0.0`. Both [Electron Packager][electron-packager] and
[Electron Forge][electron-forge] have a
[`darwinDarkModeSupport` option][packager-darwindarkmode-api]
to automate the `Info.plist` changes during app build time.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe move the macOS section to another H2 below Overview for platform-specific considerations.

docs/tutorial/dark-mode-guide.md Outdated Show resolved Hide resolved
Comment on lines 26 to 29
theming from the OS. If you wish to opt-out while using Electron > 8.0.0,
you must set the `NSRequiresAquaSystemAppearance` key in the `Info.plist` file
to `true`. Please note that Electron 8.0.0 and above will not let you opt-out
of this theming, due to the use of the macOS 10.14 SDK.
Copy link
Member

Choose a reason for hiding this comment

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

This opt-out, however, is macOS specific (maybe move to platform-specific section mentioned above).

docs/tutorial/dark-mode-guide.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode-guide.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode-guide.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode-guide.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode-guide.md Outdated Show resolved Hide resolved
@erickzhao
Copy link
Member

erickzhao commented Oct 27, 2020

If we're renaming this guide do we need to add a redirect from the old URL on the website?

@MarshallOfSound I can add a PR to electronjs.org after this is merged and it's live on the website.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 28, 2020
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
docs/tutorial/dark-mode.md Outdated Show resolved Hide resolved
@erickzhao erickzhao self-requested a review October 28, 2020 23:36
@zcbenz zcbenz merged commit 6017a0d into electron:master Nov 2, 2020
@release-clerk
Copy link

release-clerk bot commented Nov 2, 2020

Release Notes Persisted

Revised dark mode feature page, added example that demonstrates the feature, added gif representing the code sample

erickzhao pushed a commit to erickzhao/ericktron that referenced this pull request Dec 1, 2020
* docs: revised dark mode page

* docs: fixed lint errors in dark mode page

* docs: fixed mentions, revised doc structure in the dark mode feature page

* docs: fixed mentions, made all the steps more verbose in the dark mode feature page
@bandantonio bandantonio changed the title docs: revised dark mode feature page [GSoD] docs: revised dark mode feature page Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants