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
Add automatic switching between Dark Mode and Light #6051
Add automatic switching between Dark Mode and Light #6051
Conversation
@desktop/engineering not sure where the best place to put the currently commented code would be. We would basically need to subscribe to the electron event |
@say25 thanks for opening this up!
As this is a UI-specific feature, what about a module under desktop/app/src/ui/window/title-bar.tsx Lines 55 to 58 in 412959e
And like Alternatively, you could have this live in Inside this.window.on('blur', () => this.window.webContents.send('blur')) And ipcRenderer.on('blur', () => {
dispatcher.setAccessKeyHighlightState(false)
dispatcher.setAppFocusState(false)
})
The module could be conditionalized using |
3a2f5a7
to
18c0abe
Compare
🎉 |
Co-Authored-By: shiftkey <github@brendanforster.com>
e9cc24b
to
1d746fa
Compare
Merge conflict from #6109 resolved. @desktop/engineering this should be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't updated to Mojave yet so I'm not the ideal person to be testing this, but I can help out from the "non-Mojave" and "non-macOS" testing side.
Legend for the emoji next to comments:
- 🎨 suggestions for cleanup
- 💭 things I'm still wrapping my head around
Other things are changes that I'd recommend making
@say25 do you have any pointers for reviewers to help with testing this out on Mojave? It'd be nice to be able to quickly verify that the theme changes in macOS are propagated to Desktop, and that the preferences setting is respected... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor things, but I've also tested out the current theme switching behaviour non-Mojave and Windows setups and those seem fine. I'm not going to upgrade to Mojave for a few weeks, so I'm going to ask someone running Mojave to also review and test this out.
Sorry, I can't test this till later
Given that #6069 just got approved (and hopefully shall merge soon) I'll remove the electron 2.0.9 pollyfill at that time |
@shiftkey installed macOS Mojave on her machine, can confirm this works without state. Changed the check you sugguested to |
Changes are fine, and I've tested non-Mojave scenarios, but I don't have Mojave installed to do the real testing
With #6069 merged down to |
The UI was tested for this change, and overall it functions well.
Notes: cannot test if the setting in Desktop is saved until this feature hits beta. Build/OS: 1.5.1-beta0, mac |
@shiftkey welcome back :D, noticed a merge conflict on this a couple days ago, resolved so it isn't currently blocked by me. |
@say25 I don't plan to upgrade to Mojave this year (lol) so someone else who does have it is going to have to jump in here to help out with reviewing... |
Seems legit to me. |
@billygriffin @say25 because we've already merged in a bit of new work since the release I suspect we'll just cherry-pick the specific changes we want to go out and have a short beta cycle for |
Overview
Add automatic switching between Dark Mode and Light Mode or ability to change it programmatically.
Closes #5037
Description
Release notes
Notes: Add automatic switching between Dark Mode and Light Mode (macOS Mojave Dark Mode).