fix(web): unify theme toggle animation and behavior

Merged
MA
2mo ago
+42-73

Summary

  • Remove the sliding theme reveal and its CSS.
  • Route the theme button and D shortcut through the same toggle, switching between system and the opposite visible theme.
  • Use the browser's page-wide view transition for both controls; register D with TanStack Hotkeys.

Validation

  • pnpm --filter web typecheck
  • pnpm --filter web lint
  • pnpm --filter web format:check
  • git diff --check

Summary by cubic

Unifies the theme toggle between the theme button and the D hotkey, replacing the custom sliding reveal with the browser's page-wide view transition.

  • Removes the custom theme-line-reveal animation and related CSS.
  • Routes both controls through the same toggle, preserving reduced-motion behavior.
  • Registers D with TanStack Hotkeys and disables next-themes' default hotkey.

Summary by CodeRabbit

  • New Features
    • Added the D keyboard shortcut to toggle the theme. It is ignored while composing text, inside dialogs, or when typing in inputs.
  • Changes
    • Theme changes use the browser’s view transition when available. When reduced motion is preferred or view transitions aren’t supported, the theme changes without a transition.
    • Removed the decorative line-reveal effect during theme transitions.