Skip to content

Bug 1941337: Sign the Delta column and group thousands in metric values - #1071

Open
sumairq wants to merge 5 commits into
mozilla:mainfrom
sumairq:improve-numberformat
Open

Bug 1941337: Sign the Delta column and group thousands in metric values#1071
sumairq wants to merge 5 commits into
mozilla:mainfrom
sumairq:improve-numberformat

Conversation

@sumairq

@sumairq sumairq commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Improves numeric formatting in the comparison results, addressing the two asks in
Bug 1941337:

  1. Explicit sign on the Delta column — positive change percentages now render
    with a leading + (e.g. +53.31 % instead of 53.31 %), so direction is
    immediately readable alongside the existing - on negatives.
  2. Thousands grouping on measurement values — large stat values now use a
    grouping separator (e.g. 2,113.69), completing the work started in Format numbers in revision and subtests revision rows #828 which
    covered the Base/New columns.

Locale stays hardcoded to en-US, per the decision recorded on the bug.

Changes

Sign (+) on directional percentages — via a small signPrefix helper:

  • Student's-T Delta %: results table, subtests table, and the expanded
    "Difference of means" / "Difference of medians" lines.
  • Mann-Whitney median-diff %: results table and subtests table.
  • Left unsigned by design (not directional change values): CLES %, Cliff's Delta
    (−1…1), p-values, and confidence.

Thousands grouping on measurement values — via formatNumberFixedTwo (grouping

  • fixed 2 decimals, matching the prior .toFixed(2) appearance):
  • Mann-Whitney expanded metrics table: mean, median, variance, std dev, min, max.
  • RunValues: the overflow individual run values and the standard-deviation line
    now group consistently with the first-100 values and Base/New columns from Format numbers in revision and subtests revision rows #828.

Notes / decisions

  • Percentages are never grouped — only measurement values are. A Delta % gets a
    sign, not a separator.
  • Decimal places are preserved where they mattered. The metrics cells keep
    exactly 2 decimals (mirroring .toFixed(2)); RunValues reuses the existing
    formatNumber, so its values follow the same ≤3-decimal display as the rest of
    the column (real run values are ≤2 decimals, so this is not visible in practice;
    full precision is still preserved by the "Copy results" button).
  • Formatters are module-level cached instances, consistent with the existing
    formatNumber / dateFormatter in src/utils/format.ts.

🤖 Generated with Claude Code

@netlify

netlify Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploy Preview for mozilla-perfcompare ready!

Name Link
🔨 Latest commit 8768dcf
🔍 Latest deploy log https://app.netlify.com/projects/mozilla-perfcompare/deploys/6a65802b65f09c000854c06d
😎 Deploy Preview https://deploy-preview-1071--mozilla-perfcompare.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant