Animate goal progress bars#323
Conversation
|
@Mash4-4-4-4 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
This PR bundles several unrelated changes: goal progress bar animation (GoalTracker), BackToDashboard component (same as PR #314), PRMetrics changes, and prs/route.ts modifications. This makes review very difficult. Additionally there's a conflict with Please split into focused PRs — at minimum separate the GoalTracker animation from the PR metrics changes. Rebase each on main to resolve conflicts. |
e4efe5a to
4343f8d
Compare
|
This PR replaces the entire Before rebase, please scope this PR to just the animation changes (progress bar animation, confetti on completion) rather than a full file rewrite. Only change what's needed for the animation feature — don't touch unrelated parts of GoalTracker. This makes the diff easier to review and reduces conflict surface area with other open PRs targeting GoalTracker. |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
1. Animation logic broken — mounted flips after a 50 ms setTimeout, which is too fast for the browser to paint a 0% frame before jumping to the final width. The transition-all duration-700 never runs smoothly. Use requestAnimationFrame or two sequential useEffect calls to guarantee a separate paint pass.
2. Confetti-on-goal-completion regressed — prevGoalsRef, initialLoadDoneRef, and activeConfettiGoalId are all deleted without mention. The confetti burst on goal completion is now gone. Restore it.
3. "Updated X min ago" display silently removed — the interval and state that drove the timestamp were deleted. Restore or explicitly state this is intentional.
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Two issues:
-
Missing EOF newline — add a trailing newline to GoalTracker.tsx.
-
Raw Tailwind color classes — this project uses CSS variables for all colors. Replace:
text-red-400→text-[var(--destructive)]text-red-300→text-[var(--destructive)](or appropriate opacity variant)text-red-500→text-[var(--destructive)]
All colors should go through CSS vars so they work in both light and dark themes.
Summary
Added smooth mount animations to GoalTracker progress bars so goal progress fills gradually instead of snapping instantly to the final width.
Closes #209
Type of Change
Changes Made
mountedstate to defer width updates for animationprefers-reduced-motionHow to Test
Steps for the reviewer to verify this works:
prefers-reduced-motionScreenshots (if UI change)
Added smooth animated progress bar fill effect in the GoalTracker component.
Checklist
npm run lintpasses locallynpm run type-check)