Skip to content

feat: added ComparisonStatsCard component and test suite (#1510)#1885

Open
tamoghnodeb wants to merge 8 commits into
JhaSourav07:mainfrom
tamoghnodeb:test/comparison-stats-card
Open

feat: added ComparisonStatsCard component and test suite (#1510)#1885
tamoghnodeb wants to merge 8 commits into
JhaSourav07:mainfrom
tamoghnodeb:test/comparison-stats-card

Conversation

@tamoghnodeb
Copy link
Copy Markdown

Description

Created the ComparisonStatsCard UI component to display dynamic growth metrics (positive/negative/neutral trends). Additionally, implemented a robust 12-test suite in Vitest and configured vitest.config.ts to properly route .test.tsx files to the jsdom environment.

Fixes #1510

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A — This PR focuses on a UI component structure and a Vitest testing suite. All 1009 tests pass locally.

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have started the repo.
  • I have made sure that i have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 30, 2026

@optiondefault is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

👋 Hey @tamoghnodeb, welcome to CommitPulse! 🎉

Thanks for opening your first pull request — this is a big deal and we appreciate the effort!

While you wait for a review, please double-check:

  • ✅ You've read the CONTRIBUTING.md checklist
  • npm run lint, npm run format, and npm run test all pass locally
  • ✅ Your PR has a visual preview if it touches any SVG output
  • 💬 You've joined our Discord for faster PR feedback

A maintainer will review your PR shortly. Hang tight! 🚀

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label May 30, 2026
@github-actions
Copy link
Copy Markdown

🚨 Hey @tamoghnodeb, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

Please fix the issues before this can be reviewed. Here's how:

1. Run checks locally before pushing:

npm run format:check   # Check Prettier formatting
npm run lint           # Run ESLint
npm run typecheck      # TypeScript type check
npm run test           # Run unit tests (Vitest)
npm run build          # Verify production build passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

@tamoghnodeb
Copy link
Copy Markdown
Author

The two CI failures are caused by pre-existing issues in the upstream main branch that are unrelated to this PR:

lib/github.test.ts:356 — TypeScript error: Property 'totalContributions' does not exist on type 'ExtendedContributionData' (type was renamed in main but the test file was not updated)
ESLint warnings in app/customize/utils.test.ts, app/components/CustomizeCTA.test.tsx, and app/api/streak/route.ts — none of these files were touched by this PR

All 1009 tests pass locally across 72 test files. This PR only adds components/dashboard/ComparisonStatsCard.tsx, components/dashboard/ComparisonStatsCard.test.tsx, vitest.setup.ts, and updates vitest.config.ts. Happy to rebase once main is fixed.

@Aamod007
Copy link
Copy Markdown
Collaborator

Aamod007 commented Jun 1, 2026

@tamoghnodeb resolve conflicts

@github-actions github-actions Bot added the type:feature New features, additions, or enhancements label Jun 2, 2026
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jun 2, 2026
@Aamod007 Aamod007 added GSSoC 2026 mentor:Aamod007 type:testing Adding, updating, or fixing tests level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSSoC 2026 level:advanced Complex contributions involving architecture, optimization, or significant feature work mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:feature New features, additions, or enhancements type:testing Adding, updating, or fixing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(ui): verify responsive rendering and elements of ComparisonStatsCard (Variation 1)

3 participants