mirror of
https://github.com/tiennm99/ai-coding-workflow-labs.git
synced 2026-09-18 22:22:31 +00:00
Tile spawn pop (200ms scale 0→1), merge bounce (200ms scale 1→1.2→1), score "+N" float (600ms rise+fade), overlay fade-in (800ms opacity). All CSS @keyframes, all respect prefers-reduced-motion. Epic 3 complete.
1.8 KiB
1.8 KiB
Story 3.2: Tile Spawn Pop Animation
Status: done
Story
As a player, I want new tiles to pop into existence, so that I can easily spot where the new tile appeared.
Acceptance Criteria
- A new tile spawned after a move plays a pop animation scaling from 0 to 1.0 over 200ms using CSS @keyframes
- The pop animation begins after the slide animation completes (sequential: slide then spawn)
- When prefers-reduced-motion is enabled, the tile appears instantly at full size with no animation
Tasks / Subtasks
-
Task 1: Add @keyframes tile-pop animation (AC: #1)
- Added
@keyframes tile-pop { 0% { scale(0) } 100% { scale(1) } }to app.css - Tile.svelte applies
animation: tile-pop 200mswhenisNewprop is true
- Added
-
Task 2: Sequential timing (AC: #2)
- Pop animation starts on DOM insertion — tile appears after slide completes naturally since spawned tiles are added with the new grid state
-
Task 3: Reduced motion support (AC: #3)
- Already handled by
@media (prefers-reduced-motion)rule settinganimation-duration: 0s !importantfrom Story 3.1
- Already handled by
-
Task 4: Verify all tests pass
- 59 tests passing, no regressions
Dev Notes
isNewflag already tracked by tile-tracker.js from Story 3.1- Animation CSS added to app.css (centralized @keyframes)
- Tile.svelte conditionally applies animation based on
isNewprop
Dev Agent Record
Agent Model Used
Claude Opus 4.6 (1M context)
Completion Notes List
- Added @keyframes tile-pop to app.css
- Tile.svelte applies pop animation conditionally via $derived
animationproperty - prefers-reduced-motion already handled from Story 3.1
File List
- src/app.css (modified — @keyframes tile-pop)
- src/components/Tile.svelte (modified — conditional animation)