Skip to content

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

Merged
dsanders11 merged 1 commit into
mainfrom
fix/default-theme
Dec 9, 2024
Merged

fix: improve behavior with regard to sync with system theme#1659
dsanders11 merged 1 commit into
mainfrom
fix/default-theme

Conversation

@dsanders11

Copy link
Copy Markdown
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 a team and codebytere as code owners December 6, 2024 23:07
@coveralls

coveralls commented Dec 6, 2024

Copy link
Copy Markdown

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
@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

Development

Successfully merging this pull request may close these issues.

Fresh Installs Default to Dark Theme Even if System is Light Theme Does Not Sync with System Theme If Changed While Closed

4 participants