feat(ui): remove animations and clean up UI components#9
Merged
Conversation
- Remove waiting games counter display - Add modal for max games limit with frontend/backend validation - Add prominent spectator mode banner in game view - Keep header visible in game view with name update functionality - Add input filtering for display names (letters, numbers, spaces only) - Add 401 error handling that clears localStorage and redirects - Add share button for waiting games in games list - Update tests to match new behavior
- Fix START squares to use blue highlighting for can-move-from - Fix HOME squares to use green highlighting for valid destinations only - Add purple highlighting for selected pieces on START squares - Adjust piece positioning on START/HOME squares to avoid covering text - Ensure consistent blue/green/purple highlighting across all square types
- Hide dice roller component when game status is 'finished' - Forfeit button already only shows for 'active' games - Add clear comments explaining the conditional rendering - Improves UX by removing irrelevant actions for completed games
- Convert GAME OF UR title from h1 to clickable button - Add hover effect with color transition - Navigate to /games page when clicked - Improves navigation UX by providing quick access to games list
- Add game path utilities for calculating move paths and coordinates - Implement CSS animations for smooth piece movement - Update Board component to support animated moves - Add animation state management to game detail page - Pieces now animate through correct squares instead of jumping directly - Animation duration: 400ms per step with smooth transitions - Maintains piece stacking and positioning during animation
- Add console logging to track animation state and piece movement - Simplify animation logic to animate first piece from source position - Fix CSS transitions with !important to ensure animation works - Reduce animation timeout from 2s to 1s for better responsiveness - Debug piece index matching and transform calculations
- Remove animation state and logic from Board component - Remove CSS transitions and transforms from globals.css - Simplify move handling by removing animation delays - Remove unused animation utility functions - Update tests to reflect removed functions All tests passing, no functional changes to game logic.
…et to transform calculation
- Change test expectation from exact unique count to range check - Test now expects at least 2 unique values and at most MAX_ROLL + 1 - Eliminates probabilistic unreliability that caused intermittent failures
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes UI animations from the game board and performs various UI improvements and cleanup across the frontend.
Changes Made
Animation Removal
transform: scale()effects, transitions, and animation classescalculateMovePath,getPieceTransform)UI Improvements & Cleanup
action-history.entity.test.ts)Impact
Files Changed
apps/web/components/game-board/Board.tsxapps/web/app/globals.cssapps/web/app/games/[id]/page.tsxapps/web/lib/game-path.tsapps/web/lib/game-path.test.tsapps/web/components/game-board/GameStatus.tsxapps/web/components/games/CreateGameButton.tsxapps/web/components/games/GameCard.tsxapps/web/lib/api.tsapps/api/src/games/action-history.entity.test.ts(deleted)Testing
Note
Unifies game response/types with shared constants, enforces waiting game limits and optimized queries on API, adds auth error handling and UI improvements (spectator mode, header, board), and updates tests across stack.
constants(MAX_ROLL,EXIT_POSITION,MAX_WAITING_GAMES, etc.); unify to singleGameResponse; update schemas to use constants; update exports.mapGameToGameResponse; all endpoints now returnGameResponse.MAX_WAITING_GAMESon create; add derived-state ingetByIdWithDerivedState; switchgetUserGamesto query builder with status-first ordering; various logic tweaks (EXIT stacking, MAX_ROLL dice).player1Id,player2Id,status, andstatus, createdAt.GameTurnGuardandaction-data.typestests; update e2e/unit tests (MAX_ROLL usage, new mappings, in-memory DB path).GameResponse; add 401 auth error handler with redirect.Header(name change), spectator banner; refine board layout/labels; show DiceRoller only when active; Forfeit button visibility; CSS interaction tweaks (recoloring, remove scaling).CreateGameButtonnow shows limit modal usingMAX_WAITING_GAMES;GameCardsupports sharing.game-pathutilities and tests; update component tests accordingly.Written by Cursor Bugbot for commit 069e41f. This will update automatically on new commits. Configure here.