feat(dashboard): Week 4 AC 4 - Framer Motion animations + scroll-reactive background#22
Merged
Merged
Conversation
…l, page transitions
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Closes Week 4 AC 4 (bonus). Adds Framer Motion animations across all key transitions in the dashboard: scroll-reactive background with timer field + prism wave, directional page transitions, AI report loading panel, modal spring, event feed stagger, nav indicator, toasts, count-up stats, and login entrance.
Changes
Code
components/parallax-bg.tsx— orchestrates Two.js WebGL canvas + 2D timer canvas; reads scroll velocity viauseVelocityand passes intensity to both layerscomponents/glitch-canvas.tsx— Three.js@react-three/fibercanvas: dark background shader with RGB chromatic dispersion wave that activates on scroll (frameloop="always",dpr=1,powerPreference="low-power")components/timer-field.tsx— 2D canvas overlay: 85 monospace timers drift across viewport; green idle → aggressive red + reverse time + downward parallax on scrollcomponents/page-transition.tsx—AnimatePresence mode="wait"+ directional slide (x ±36, scale 0.97→1); direction derived via getDerivedStateFromProps pattern (no refs in render)components/smooth-scroll.tsx—ReactLenis rootwrapper,duration: 1.4sexpo ease-outapp/dashboard/layout.tsx— integratesParallaxBg+PageTransition; removesbg-bgfrom wrapper so canvas shows throughapp/dashboard/reports/report-form.tsx—LoadingPanelreplaced with scanning bar + dot wave + label; metadata row styled as pill badgesapp/dashboard/reports/api-key-modal.tsx—openprop +AnimatePresence; backdrop and panel animate independently; springstiffness:400 damping:28app/dashboard/event-feed.tsx—motion.ulstagger container; first 10 items usehidden→visiblevariants (50ms stagger);lenis.resize()after each page loadapp/dashboard/event-card.tsx—motion.article+whileHover scale:1.012app/dashboard/header-nav.tsx—layoutId="nav-pill"shared element slides between active linksapp/dashboard/mobile-nav.tsx—AnimatePresence+motion.div height:0→autoreplaces CSSmax-htrickapp/dashboard/top-sessions.tsx—motion.divprogress bars animatewidth:0→actual%on mountapp/dashboard/charts.tsx—AnimatePresencefade-in when data replaces skeletonapp/dashboard/music/music-client.tsx—useCountUphook (frameranimate()) for Artists/Tracks; metadata as pill badgescomponents/toast.tsx—AnimatePresence mode="popLayout"+ spring slide-inx:120→0app/login/page.tsx+app/login/login-entrance.tsx— stagger entrance: logo → button, 0.12s apartTooling / config
package.json— addedframer-motion,three,@react-three/fiber,lenis,@types/three; removed unused@react-three/postprocessing,postprocessingapp/providers.tsx— wrapped app in<SmoothScroll>(Lenis root)Docs / plan
plans/week4/framer-motion-animations.md— full design rationale, commit plan, AC checklistDesign decisions
velocity > 80 px/s) — glitch/prism/red-timers activate only on deliberate fast scroll, not on slow browsing; avoids looking like a bugframeloop="always"+dpr=1+powerPreference="low-power"— continuous render needed for the wave animation but kept lightweight; no postprocessing pipeline (removedEffectComposer)lenis.resize()in event-feed — Lenis caches scroll height at init; without explicit resize call after infinite scroll loads new content, wheel stops workingreact-hooks/refslint rule forbids reading refs during render;useStatewith synchronoussetStateduring render (React's derived-state pattern) gives correct direction at mount time without an extra effectVerification
npx tsc --noEmit(dashboard) — cleannpm run lint(dashboard) — cleannpm run typecheck(extension) — cleanprefers-reduced-motiondisables all animationsOut of scope (future PRs)
useInViewper section)react-parallax-tilt)Closes
docs/Task.md)