Skip to content

fix(i18n): format compare sparkline data labels - #2537

Merged
graphieros merged 3 commits into
mainfrom
compare-sparkline-data-label-format
Apr 15, 2026
Merged

fix(i18n): format compare sparkline data labels#2537
graphieros merged 3 commits into
mainfrom
compare-sparkline-data-label-format

Conversation

@graphieros

@graphierosgraphieros commented Apr 15, 2026

Copy link
Copy Markdown
Member

Follow up to #2519

I was too distracted, and forgot to fix the sparklines in the compare page.
Also rounds values in the sparkline of the package page (fractional values may happen if data correction is applied)

@vercel

vercelBot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentApr 15, 2026 9:39am
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewApr 15, 2026 9:39am
npmx-lunariaIgnoredIgnoredApr 15, 2026 9:39am

Request Review

@coderabbitai

coderabbitaiBot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Replaced implicit/default data-label formatting with a locale-aware useNumberFormatter({ maximumFractionDigits: 0 }) and applied it as style.dataLabel.formatter in sparkline components to render values with zero fractional digits.

Changes

Cohort / File(s)Summary
Sparkline data label formatting
app/components/Chart/SplitSparkline.vue, app/components/Package/WeeklyDownloadStats.vue
Both components now instantiate useNumberFormatter({ maximumFractionDigits: 0 }) and set style.dataLabel.formatter to ({ value }) => numberFormatter.value.format(value), changing data-label output to locale-aware whole numbers.

Possibly related PRs

Suggested reviewers

  • 43081j
  • alexdln
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check nameStatusExplanation
Title check✅ PassedThe title accurately describes the main change: formatting compare sparkline data labels with i18n support, which directly matches the modifications applied to the sparkline components.
Description check✅ PassedThe pull request description clearly relates to the changeset, explaining it as a follow-up to fix sparkline formatting on the compare page and package page.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch compare-sparkline-data-label-format

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecovBot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@graphieros
graphieros marked this pull request as draft April 15, 2026 09:27
@graphieros
graphieros requested review from a team and removed request for a teamApril 15, 2026 09:43
@graphieros
graphieros added this pull request to the merge queueApr 15, 2026
Merged via the queue into main with commit 5fc9e99Apr 15, 2026
26 checks passed
@graphieros
graphieros deleted the compare-sparkline-data-label-format branch April 15, 2026 09:49
@github-actionsgithub-actionsBot mentioned this pull request Apr 15, 2026
ayo-run pushed a commit to ayo-run/npmx.dev that referenced this pull request Aug 5, 2026
Sign up for freeto 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.

2 participants

@graphieros@MatteoGabriele