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: change theme settings do not work after relocated data folder #4317

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

louis-jan
Copy link
Contributor

Describe Your Changes

  • Fixed an issue where changing the theme did not work after relocating the data folder. Theme settings were cached to avoid glitches during app launch, but the settings page used unnecessary cached states.

Fixes Issues

Changes made

This pull request includes several changes to the theme loading functionality in the project. The main changes involve the removal of the janThemesPathAtom and the introduction of a new applyTheme function to streamline the application of theme variables. Below are the most important changes grouped by theme.

Removal of janThemesPathAtom:

Introduction of applyTheme function:

  • web/hooks/useLoadTheme.ts: Added a new applyTheme function to handle the application of CSS variables for themes, replacing inline code with a function call. [1] [2] [3]

These changes improve the maintainability and readability of the theme loading code by removing redundant atoms and encapsulating theme application logic within a dedicated function.

@github-actions github-actions bot added the type: bug Something isn't working label Dec 23, 2024
@louis-jan louis-jan requested a review from urmauur December 23, 2024 05:32
Copy link
Contributor

Barecheck - Code coverage report

Total: 68.65%

Your code coverage diff: 0.05% ▴

Uncovered files and lines
FileLines
web/hooks/useLoadTheme.ts30-32, 91

@louis-jan louis-jan merged commit 1f4c00d into main Dec 23, 2024
16 checks passed
@louis-jan louis-jan deleted the fix/theme-settings-do-not-work-after-relocated branch December 23, 2024 06:09
@github-actions github-actions bot added this to the v0.5.12 milestone Dec 23, 2024
Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants