Skip to content

Format profile repo pill counts with compact GitHub-style numbers#13

Open
mathetos wants to merge 1 commit into
DevinWalker:mainfrom
mathetos:fix/profile-pill-number-formatting
Open

Format profile repo pill counts with compact GitHub-style numbers#13
mathetos wants to merge 1 commit into
DevinWalker:mainfrom
mathetos:fix/profile-pill-number-formatting

Conversation

@mathetos

@mathetos mathetos commented Jun 27, 2026

Copy link
Copy Markdown

Summary

Fixes #3 by formatting fork and star counts on profile repo pills.

  • Adds a shared format_count() helper for badge-style numbers.
  • Counts under 1,000 use number_format_i18n() (locale-aware grouping).
  • Counts from 1k upward use GitHub-style compact values (1.1k, 13.9k, 158k) so large profiles like Octocat stay readable inside the pills.

Why compact for pills only

The follow button and repo meta row already used full grouped numbers, which works in wider space. The profile repo pills are narrow, so matching GitHub's abbreviated style there felt like the right tradeoff.

Before and After

Before After
Before: full numbers in profile pills After: compact k notation in pills

Test plan

  • Insert a profile block with username Octocat and confirm fork/star pills show compact values (e.g. 158k, 13.9k) instead of raw digits.
  • Confirm smaller repos still show plain numbers (e.g. 580).
  • Spot-check a repository block to ensure unrelated counts are unchanged.

Profile top-repo fork and star badges now use a shared formatter: grouped
numbers below 1k, GitHub-style k/M compact values above that so large
Octocat-style counts fit the pills.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Badge / pills need number formatting

1 participant