Skip to content

feat: add sponsor badge UI integration#1341

Open
srinidhi-2006-bit wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
srinidhi-2006-bit:feat/sponsor-badge-ui
Open

feat: add sponsor badge UI integration#1341
srinidhi-2006-bit wants to merge 4 commits into
Priyanshu-byte-coder:mainfrom
srinidhi-2006-bit:feat/sponsor-badge-ui

Conversation

@srinidhi-2006-bit
Copy link
Copy Markdown
Contributor

Summary

Added a reusable SponsorBadge component and integrated sponsor badge support into leaderboard and public profile UI.

Closes #1055

Type of Change

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

Changes Made

  • Added reusable SponsorBadge component
  • Added sponsor badge rendering in leaderboard entries
  • Added sponsor badge rendering in public profile pages
  • Added accessible tooltip and aria-label support
  • Added temporary sponsor mapping for UI testing
  • Extended PublicProfileData type with sponsor support

How to Test

Steps for the reviewer to verify this works:

  1. Run:

    npm run dev
  2. Open:

    /leaderboard
    
  3. Verify sponsor badge appears beside sponsor usernames

  4. Open:

    /u/priyanshu-byte-coder
    
  5. Verify sponsor badge appears beside profile username

  6. Run:

    npm run lint
    npm run type-check
  7. Verify there are no lint or TypeScript errors

Screenshots (if UI change)

Added sponsor badge UI beside usernames in leaderboard and public profile pages.

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 27, 2026

@srinidhi-2006-bit 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.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) labels May 27, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@srinidhi-2006-bit
Copy link
Copy Markdown
Contributor Author

Hi @Priyanshu-byte-coder,

Implemented the sponsor badge UI integration for leaderboard and public profile pages.

Verified locally that:

  • npm run lint passes
  • npm run type-check passes

The PR includes:

  • Reusable SponsorBadge component
  • Sponsor badge rendering in leaderboard entries
  • Sponsor badge rendering in public profiles
  • Accessibility support with tooltip and aria-labels

Could you please review the PR and add the gssoc:approved label if everything looks good?

Thank you!

@srinidhi-2006-bit
Copy link
Copy Markdown
Contributor Author

Hi @Priyanshu-byte-coder,

Implemented the sponsor badge UI integration for leaderboard and public profile pages.

Verified locally that:

  • npm run lint passes
  • npm run type-check passes

The PR includes:

  • Reusable SponsorBadge component
  • Sponsor badge rendering in leaderboard entries
  • Sponsor badge rendering in public profiles
  • Accessibility support with tooltip and aria-labels

Could you please review the PR and add the gssoc:approved label if everything looks good?

Thank you!

@srinidhi-2006-bit
Copy link
Copy Markdown
Contributor Author

please review this and merge the PR

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

Thanks @srinidhi-2006-bit for the sponsor badge feature! The badge component and profile integration look good. However, the PR bundles a Jest setup (jest.config.js, jest.setup.js, Jest packages in package.json) which conflicts with our existing Vitest test framework.

Please:

  1. Remove jest.config.js, jest.setup.js and Jest dependencies from package.json/package-lock.json
  2. Rewrite src/components/__tests__/DashboardHeader.test.tsx using Vitest instead:
    import { describe, it, expect } from 'vitest'
    // ...
  3. Also revert tsconfig.json changes if they're only for Jest

The sponsor badge feature itself is valuable — just needs the test framework cleaned up!

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.

Hi @srinidhi-2006-bit! The sponsor badge UI is a nice feature! However, this PR adds Jest (jest.config.js, jest.setup.js, @testing-library/jest-dom, etc.) but the project uses Vitest (see vitest.config.ts). Please:

  1. Remove the Jest config files (jest.config.js, jest.setup.js) and Jest dev dependencies from package.json
  2. Rewrite the test in test/ using Vitest (import { describe, it, expect } from 'vitest')
  3. Also note: there's no DB migration to add the is_sponsor column — the vercel.json cron should also be changed to daily (0 0 * * *) if the sync runs via cron

Thanks!

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

Labels

gssoc26 GSSoC 2026 contribution type:design GSSoC type bonus: UI/design (+10 pts) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add GitHub Sponsors integration — show sponsor badge on leaderboard

2 participants