Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 25, 2025

This PR improves the UI by displaying bundle size numbers as absolute values with comma separators instead of abbreviated KB values.

Changes Made

Before: Bundle sizes were displayed as rounded KB values (e.g., "555KB")
After: Bundle sizes are now displayed as absolute byte values with commas (e.g., "568,609 bytes")

Key Updates:

  1. Data Format: Changed bundleSizeData to use actual byte values (stat.totalSize) instead of converting to KB
  2. Number Formatting: Added formatNumberWithCommas() utility function using toLocaleString() for proper comma formatting
  3. Chart Labels: Updated from "Bundle Size (KB)" to "Bundle Size (bytes)" in chart legend
  4. Stat Card: "Latest Bundle Size" now shows formatted bytes (e.g., "568,609 bytes")
  5. Tooltips: Added custom formatter for bundle size chart tooltips to display numbers with commas

Visual Impact:

  • Y-axis now shows appropriate scale (0, 150000, 300000, 450000, 600000)
  • Stat cards display precise byte counts with thousands separators
  • Chart tooltips show formatted numbers for better readability
  • Other charts (Build Time, File Types) remain unchanged

The implementation uses minimal code changes while preserving all existing functionality and maintaining the responsive design.

Fixes #24.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Improve UI Display bundle size numbers with commas in absolute bytes Aug 25, 2025
Copilot AI requested a review from Boshen August 25, 2025 06:55
@Boshen Boshen marked this pull request as ready for review August 25, 2025 06:56
@Boshen Boshen merged commit 2818ff3 into main Aug 25, 2025
2 checks passed
@Boshen Boshen deleted the copilot/fix-24 branch August 25, 2025 06:56
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.

Improve UI

2 participants