FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add status page theme mode setting and toggle by devmitulpatel · Pull Request #479 · cachethq/core · GitHub

Repository navigation

Add status page theme mode setting and toggle - #479

Open
devmitulpatel wants to merge 4 commits into
cachethq:mainfrom
devmitulpatel:theme-mode-toggle
Open

devmitulpatel wants to merge 4 commits into
cachethq:mainfrom
devmitulpatel:theme-mode-toggle

Conversation

Copy link
Copy Markdown

Closes #68.

This picks up the work from claude/status-page-theme-options-27npnb, rebases it onto main, and adapts the metrics theme handling to the extracted resources/js/metrics.js. The first two commits keep their original authorship from that branch.

Changes

  • Adds a theme.theme_mode setting (auto, light, dark) with an Appearance section on the Manage Theme page.
  • auto keeps following each visitor's system preference and shows a Light/System/Dark toggle in the status page header, persisted in localStorage.
  • Forced light/dark renders the status page in that scheme and hides the toggle.
  • Dark mode is class-based (dark/light on <html>) with a prefers-color-scheme fallback so system dark mode still works without JavaScript.
  • Metrics charts repaint on the theme-changed event.

Verification

  • composer test:unit — 1159 passed
  • vendor/bin/pint --test — clean
  • vendor/bin/phpstan analyse — no errors
  • vendor/bin/pest tests/Browser/ThemeToggleTest.php — 7 passed

claude and others added 4 commits October 5, 2026 16:38
Adds a theme.theme_mode setting (automatic, light, or dark) that is
managed from an Appearance section on the Manage Theme dashboard page.
In automatic mode, visitors get a light/system/dark toggle in the
status page header, persisted in localStorage and defaulting to their
system preference. Forcing light or dark locks the status page to that
scheme and hides the toggle.

Dark mode now uses a class strategy (.dark/.light on the html element)
with a prefers-color-scheme fallback so system dark mode still works
without JavaScript. Metric charts re-style through a theme-changed
event when the applied theme changes.

Closes cachethq#68

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CWXnTksjtcUCDPwyoWeDe
Adds pestphp/pest-plugin-browser and a browser test suite exercising
the theme toggle end-to-end: system preference resolution, picking and
persisting a theme, returning to the system theme, invalid stored
preferences, and forced light/dark modes hiding the toggle. CI test
jobs now install the Playwright browser needed to run them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CWXnTksjtcUCDPwyoWeDe
The metrics chart script moved out of the Blade template into its own
asset, so the theme mode changes need to live there. Charts now resolve
dark mode from the html class (falling back to the system preference)
and repaint when the theme-changed event fires.

Copy link
Copy Markdown
Author

Screenshots of the status page in automatic mode, following the OS preference. Forced light/dark additionally hides the header toggle.

Light:

Dark:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toggle Light / Dark Mode

2 participants


Back | FazBrowse Home | New Git URL