Skip to content

feat: light/dark mode toggle and mobile responsiveness#19

Merged
helliott20 merged 6 commits intomainfrom
feature/light-mode-and-mobile
Apr 7, 2026
Merged

feat: light/dark mode toggle and mobile responsiveness#19
helliott20 merged 6 commits intomainfrom
feature/light-mode-and-mobile

Conversation

@helliott20
Copy link
Copy Markdown
Owner

Summary

  • Light/dark mode toggle with blur circle animation (react-theme-switch-animation), CSS variable surface palette, theme-aware accent text colors, FOUC prevention
  • Mobile responsiveness overhaul — swipe-to-reveal sidebar, mobile card layouts for all table pages, responsive rule builder and queue page
  • Swipe gesture sidebar — drag from anywhere to reveal, velocity-based snap, backdrop dimming tracks finger position

Changes

Light/Dark Mode

  • CSS variable-based surface palette that inverts between modes
  • ThemeContext with react-theme-switch-animation blur circle transition
  • Sun/Moon toggle in sidebar icon row and mobile header
  • Theme-aware accent-text color (amber-700 light / amber-400 dark) for WCAG contrast
  • Fixed text-white on accent backgrounds → text-amber-950
  • Softened shadows for light mode across cards, modals, toasts

Mobile Responsiveness

  • SmartRuleBuilder: preview stacks below form on mobile, scrollable tabs
  • ConditionEditor: responsive min-widths, hidden hint text on mobile
  • Queue: rows restructure to 2-row layout on mobile, header buttons wrap
  • MediaTable: new card layout on mobile, table hidden below sm
  • History: new card layout on mobile, responsive header
  • ActivityLog: new card layout on mobile, responsive filters/pagination
  • Sidebar: solid background (was transparent), swipe gesture to reveal/hide
  • Touch targets: increased footer icon buttons to meet 44px minimum

Test plan

  • Toggle light/dark mode on desktop — blur circle animation plays
  • Verify no FOUC on page refresh in both modes
  • Check all pages readable in light mode (headings, body text, badges, buttons)
  • Test swipe-to-reveal sidebar on mobile (both directions)
  • Verify hamburger button still works as fallback
  • Check Queue page on mobile — rows stack properly, actions accessible
  • Check Rules dialog on mobile — form visible, preview below
  • Check Library table view on mobile — card layout shows
  • Check History/Activity pages on mobile — card layouts show
  • Verify desktop is unaffected by all mobile changes

- CSS variable-based surface palette that inverts between modes
- ThemeContext with react-theme-switch-animation blur circle transition
- Sun/Moon toggle in sidebar icon row and mobile header
- FOUC prevention via inline script in index.html
- Theme-aware accent text color (amber-700 light / amber-400 dark)
- Fixed text-white on accent backgrounds to text-amber-950
- Softened shadows for light mode across cards, modals, toasts
- Respects system preference, persists to localStorage
- SmartRuleBuilder: stack preview below form on mobile, scrollable tabs
- ConditionEditor: reduce min-widths for mobile, hide hint text
- Queue: restructure rows to stack on mobile, wrap header buttons
- MediaTable: add mobile card layout alongside desktop table
- History: add mobile card layout, responsive header
- ActivityLog: add mobile card layout, responsive filters/pagination
The 50% opacity sidebar was see-through in light mode, making
nav text hard to read against page content bleeding through.
- Swipe right anywhere on screen to pull sidebar out
- Sidebar follows the finger in real-time during drag
- Velocity-based snap: fast swipe opens/closes regardless of position
- Swipe left on open sidebar to close it
- Backdrop opacity tracks sidebar position smoothly
- Hamburger button still works as fallback
- Desktop sidebar unaffected (lg: breakpoint)
- Add touchcancel handler to prevent sidebar getting stuck mid-drag
- Fix backdrop display:none cutting fade animation on Escape/route close
- Fix backdrop opacity inconsistency (0.5 vs 0.6) — now consistently 0.6
- Add aria-label to sidebar theme toggle for screen readers
- Increase footer icon touch targets from p-1.5 to p-2.5 (36px hit area)
@helliott20 helliott20 merged commit 1a029bc into main Apr 7, 2026
@helliott20 helliott20 deleted the feature/light-mode-and-mobile branch April 7, 2026 10:48
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