Skip to content

Wire dark mode sidebar toggle#268

Merged
version-1 merged 1 commit into
mainfrom
issue/215-dark-mode
Jul 12, 2026
Merged

Wire dark mode sidebar toggle#268
version-1 merged 1 commit into
mainfrom
issue/215-dark-mode

Conversation

@version-1

Copy link
Copy Markdown
Owner

Wire the dark-mode Sidebar toggle

Summary

Connect the existing Sidebar switch to layout-level theme state. An explicit
user selection is persisted locally; until then, the UI follows the operating
system color-scheme preference.

主な変更点:

  • Add a layout theme hook that applies the existing dark token set.
  • Persist explicit dark / light choices under tasq.theme.
  • Keep the Sidebar switch controlled and cover persistence and OS-following behavior.

チケットへのリンク

Tasq issue #215

やったこと

  • Saved theme values take precedence over prefers-color-scheme.
  • Without a saved value, matchMedia changes update the theme in real time.
  • Toggling the switch stores the selected theme and stops OS-following.

動作確認

  • npm test (104 tests)
  • npm run typecheck
  • npm run build

レビュー & 動作確認 チェックリスト

  • Persistence - Reload uses the explicitly saved theme.
  • System preference - No saved theme follows OS dark-mode changes.
  • Scope - Existing language and refresh-interval persistence remain unchanged.

推奨テスト計画:

  1. Remove tasq.theme from localStorage and change the OS preference.
  2. Toggle Dark mode from the Sidebar and reload.
  3. Confirm language and refresh interval settings still persist.

その他気になることや相談ごと

The two-state switch intentionally does not indicate whether its current value
comes from the system preference or an explicit user selection.

Persist explicit theme choices, follow the operating system before a choice is made, and cover the behavior with component tests.
@version-1 version-1 merged commit d360ec8 into main Jul 12, 2026
5 checks passed
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.

1 participant