Repository navigation
Conversation
matlads
force-pushed
the
add-web-dark-mode
branch
from
October 29, 2026 04:13
245ad97 to
df4a357
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7121 +/- ##
=======================================
Coverage 80.93% 80.93%
=======================================
Files 150 150
Lines 21257 21257
Branches 3246 3246
=======================================
Hits 17205 17205
Misses 3244 3244
Partials 808 808 🚀 New features to boost your workflow:
|
Member
|
Is it possible to somehow add a button that triggers the colorscheme? |
matlads
force-pushed
the
add-web-dark-mode
branch
from
November 25, 2026 18:53
df4a357 to
f194645
Compare
Add a header button that cycles the color scheme through auto, light and dark. The choice is stored in localStorage; "auto" follows the OS preference and reacts to live changes. Dark styles are now selected via a data-theme attribute on <html> instead of a prefers-color-scheme media query, and an inline script applies the saved theme before first paint to avoid a flash.
Contributor
Author
|
Added the color scheme button requested in the review: it cycles auto → light → dark, defaults to auto (following the OS preference), persists the choice in |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds dark mode to the beets web UI, with a header button to choose the color
scheme: auto (follows the OS/browser preference), light, or dark. The choice is
remembered in
localStorage.Changes
link color and disabled player button (
beetsplug/web/static/beets.css).localStorage, and reacts to live OS theme changes while in auto(
beetsplug/web/static/beets.js,beetsplug/web/templates/index.html).data-themeattribute on<html>ratherthan a
prefers-color-schememedia query, so the button can override the OSpreference. An inline script applies the saved theme before first paint to
avoid a flash.
docs/plugins/web.rst) and changelog entry.Testing
pytest test/plugins/test_web.py— 46 passed.ruff check,ruff format --check,docstrfmt,sphinx-lint— clean.auto follows OS theme changes.