Skip to content

Animate goal progress bars#323

Open
Mash4-4-4-4 wants to merge 5 commits into
Priyanshu-byte-coder:mainfrom
Mash4-4-4-4:animate-goal-progress-bars
Open

Animate goal progress bars#323
Mash4-4-4-4 wants to merge 5 commits into
Priyanshu-byte-coder:mainfrom
Mash4-4-4-4:animate-goal-progress-bars

Conversation

@Mash4-4-4-4
Copy link
Copy Markdown

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

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Added animated progress bar fill effect on initial render
  • Added mounted state to defer width updates for animation
  • Added support for prefers-reduced-motion
  • Improved progress bar transition timing with ease-out animation

How to Test

Steps for the reviewer to verify this works:

  1. Open the dashboard page
  2. Navigate to the GoalTracker section
  3. Refresh the page
  4. Verify progress bars animate smoothly from 0% to their target width
  5. Enable prefers-reduced-motion
  6. Refresh again and verify animation is skipped

Screenshots (if UI change)

Screenshot 2026-05-18 192336

Added smooth animated progress bar fill effect in the GoalTracker component.

Checklist

  • Linked issue in summary
  • npm run lint passes locally
  • No TypeScript errors (npm run type-check)
  • Self-reviewed the diff
  • Added/updated tests if applicable

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@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.

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

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 prs/route.ts (modified by a recently merged PR).

Please split into focused PRs — at minimum separate the GoalTracker animation from the PR metrics changes. Rebase each on main to resolve conflicts.

@Mash4-4-4-4 Mash4-4-4-4 force-pushed the animate-goal-progress-bars branch from e4efe5a to 4343f8d Compare May 19, 2026 10:07
@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

This PR replaces the entire GoalTracker.tsx file. Since the file has been modified by other merged PRs, this will likely conflict when GitHub computes the merge state.

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.

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1. Animation logic brokenmounted 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 regressedprevGoalsRef, 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 Priyanshu-byte-coder added level:beginner GSSoC: Beginner difficulty (20 pts) gssoc26 GSSoC 2026 contribution type:design GSSoC type bonus: UI/design (+10 pts) labels May 20, 2026
Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two issues:

  1. Missing EOF newline — add a trailing newline to GoalTracker.tsx.

  2. Raw Tailwind color classes — this project uses CSS variables for all colors. Replace:

    • text-red-400text-[var(--destructive)]
    • text-red-300text-[var(--destructive)] (or appropriate opacity variant)
    • text-red-500text-[var(--destructive)]

    All colors should go through CSS vars so they work in both light and dark themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution level:beginner GSSoC: Beginner difficulty (20 pts) type:design GSSoC type bonus: UI/design (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GOOD FIRST ISSUE] Animate GoalTracker progress bar fill on first render

2 participants