Skip to content

feat: Add option to disable automatic dark mode in settings#566

Merged
surajshetty3416 merged 12 commits intodevelopfrom
option-to-disable-dark-mode
Apr 28, 2026
Merged

feat: Add option to disable automatic dark mode in settings#566
surajshetty3416 merged 12 commits intodevelopfrom
option-to-disable-dark-mode

Conversation

@surajshetty3416
Copy link
Copy Markdown
Member

@surajshetty3416 surajshetty3416 commented Apr 28, 2026

  • Option to disable automatic dark mode via Settings
  • Added Dark Mode toggle template (authored by @stravo1)
  • Used light-dark css function to handle theme colors instead of maintaining redundant list for light and dark variables

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.07%. Comparing base (dec03fd) to head (94ab9b6).
⚠️ Report is 14 commits behind head on develop.

Files with missing lines Patch % Lines
...ilder/doctype/builder_settings/builder_settings.py 33.33% 2 Missing ⚠️
...ilder/builder/doctype/builder_page/builder_page.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #566      +/-   ##
===========================================
- Coverage    57.09%   57.07%   -0.02%     
===========================================
  Files           29       29              
  Lines         3151     3157       +6     
===========================================
+ Hits          1799     1802       +3     
- Misses        1352     1355       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

stravo1 and others added 9 commits April 28, 2026 15:52
switched from prefers-color-scheme to data-theme and using JS for auto switching

this also avoid css variable repetition

Co-authored-by: Copilot <copilot@github.com>
- Follow system theme by default
- if disable_auto_dark_mode is enabled `data-prefers-color-scheme` is forced to "light"
- in preview mode `data-prefers-color-scheme` is used to preview theme based on editors theme
- `data-theme` is used to overrride everything... users can change this to override default theme

Co-authored-by: Copilot <copilot@github.com>
and fix first toggle. It used to take two clicks to switch to dark mode (only on the first attempt)
…it look consistent with others

It used to look too big comparatively
to provide enough padding below the template name
Co-authored-by: Sayantan Ghosh <stravoone@gmail.com>
@surajshetty3416 surajshetty3416 force-pushed the option-to-disable-dark-mode branch from d610626 to 0b25f89 Compare April 28, 2026 13:03
No point in sending extra unnecessary text. To Understand more about this feature
99799a0
@surajshetty3416 surajshetty3416 force-pushed the option-to-disable-dark-mode branch from ea5d3d5 to 94ab9b6 Compare April 28, 2026 14:07
@surajshetty3416 surajshetty3416 merged commit 21856cc into develop Apr 28, 2026
7 checks passed
surajshetty3416 added a commit that referenced this pull request Apr 29, 2026
issue introduced via: #566

Co-authored-by: Sayantan Ghosh <stravoone@gmail.com>
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.

2 participants