Skip to content

Conversation

RafBorrelli
Copy link
Contributor

@RafBorrelli RafBorrelli commented May 20, 2025

Description

Added thousands separator for all_items of MudTablePager

How Has This Been Tested?

It has only been tested visually.

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or improvement to the website or code docs)

Example

Note: the string interpolation $"{filteredItemsCount:N0}" uses CultureInfo.CurrentCulture by default.
In this environment, the culture is set to it-IT (Italian), so the thousands separator is a dot (.).
For example, 88088 will be formatted as 88.088.
The output may vary depending on the culture settings of the environment where the application is running.

Before
image

After
image

Checklist

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added enhancement Request for adding a new feature or enhancing existing functionality (not fixing a defect) PR: needs review labels May 20, 2025
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.11%. Comparing base (6d458b8) to head (5002957).
Report is 13 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #11371      +/-   ##
==========================================
- Coverage   91.11%   91.11%   -0.01%     
==========================================
  Files         465      465              
  Lines       14402    14402              
  Branches     2785     2785              
==========================================
- Hits        13123    13122       -1     
  Misses        643      643              
- Partials      636      637       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danielchalmers danielchalmers requested a review from Copilot May 20, 2025 16:49
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a thousands separator for the "all_items" value in MudTablePager to improve number readability.

  • Updated the string interpolation for the all_items value in the Info property.
  • Adjusted the Localizer call to use the formatted number with a thousands separator.
Comments suppressed due to low confidence (1)

src/MudBlazor/Components/Table/MudTablePager.razor.cs:125

  • The thousands separator implementation appears correct, but it's only visually tested. Consider adding unit tests to verify the formatting behavior across different culture settings.
.Replace("{all_items}", $"{filteredItemsCount:N0}");

Copy link
Member

@danielchalmers danielchalmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. An invariant test might help

@danielchalmers danielchalmers merged commit 18ab6ae into MudBlazor:dev May 22, 2025
7 checks passed
@RafBorrelli RafBorrelli deleted the feature/mudtablepager-thousands-separator branch May 26, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Request for adding a new feature or enhancing existing functionality (not fixing a defect)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants