Skip to content

Light theme and invite by link#19

Merged
timofeykafanov merged 10 commits intodevelopfrom
light-theme
Mar 13, 2026
Merged

Light theme and invite by link#19
timofeykafanov merged 10 commits intodevelopfrom
light-theme

Conversation

@timofeykafanov
Copy link
Copy Markdown
Collaborator

Light Theme, Invite-by-Link & Test Coverage

Light Theme Support

  • Introduced a full semantic color token system in app.css with CSS custom properties for surfaces, text, borders, overlays, and status colors
  • Added both light (default) and dark theme definitions, toggled via the .dark class on <html>
  • Created useTheme hook for persisting theme preference to localStorage with system-preference fallback
  • Added ThemeToggle component (sun/moon icon button, fixed top-right)
  • Migrated all hardcoded gray-* / white Tailwind classes across components to semantic tokens (bg-surface, text-on-surface, border-outline, etc.)
  • Replaced all SVG icons with CSS/Unicode alternatives to comply with subject restrictions

Invite by Link

  • Added a new /:room/:playerName dynamic route (join.tsx) so players can join a room directly via a shared URL
  • Added a "Copy room link" button to RoomControls with clipboard API + fallback, giving instant invite-by-link functionality
  • Passed playerName through to RoomControls for link generation

Tests

  • Added comprehensive tests for ThemeToggle (8 tests), useTheme hook (10 tests), RoomControls (20+ tests), and gamesService
  • Updated existing tests (GameModeSelector, OpponentCard, routes) to work with the new semantic-token styling and the new join route
  • All client tests passing with coverage thresholds met

@timofeykafanov timofeykafanov merged commit 1efce29 into develop Mar 13, 2026
3 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