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

fix: improve behavior with regard to sync with system theme #1659

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

dsanders11
Copy link
Member

Fixes #1658
Fixes #1657

This fixes a couple of issues, cleans up the relevant code, and improves the UX. See issues above for specifics of what is fixed here.

We had logic distributed in multiple places to fall back to defaultDark if no theme was set (like on initial install) so this PR refactors that to be at a higher level and avoids an unnecessary IPC call to the main process on initial install.

Improves UX by retaining the user's selected theme regardless of what state the "Sync theme with system setting" checkbox is in. Previously the theme selection dropdown would snap to whatever the system theme at the time was. Now the theme selection remains static and checking/unchecking the checkbox merely updates the theme to match the system, which is more intuitive than the theme selection changing by itself.

@dsanders11 dsanders11 requested a review from erickzhao December 6, 2024 23:07
@dsanders11 dsanders11 marked this pull request as ready for review December 6, 2024 23:07
@dsanders11 dsanders11 requested review from codebytere and a team as code owners December 6, 2024 23:07
@coveralls
Copy link

coveralls commented Dec 6, 2024

Coverage Status

coverage: 87.597% (+0.002%) from 87.595%
when pulling 3572c91 on fix/default-theme
into 5232b60 on main.

@dsanders11 dsanders11 changed the title fix: default to current system theme if no theme set fix: improve behavior when regarding sync with system theme Dec 6, 2024
@dsanders11 dsanders11 changed the title fix: improve behavior when regarding sync with system theme fix: improve behavior with regard to sync with system theme Dec 6, 2024
@dsanders11 dsanders11 merged commit 4d7f807 into main Dec 9, 2024
10 checks passed
@dsanders11 dsanders11 deleted the fix/default-theme branch December 9, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants