refactor: consolidate count and relative-time formatting utilities#5220
refactor: consolidate count and relative-time formatting utilities#5220xuang7 wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5220 +/- ##
============================================
- Coverage 48.95% 45.99% -2.97%
+ Complexity 2377 2218 -159
============================================
Files 1048 1050 +2
Lines 40270 40661 +391
Branches 4272 4332 +60
============================================
- Hits 19714 18700 -1014
- Misses 19402 20835 +1433
+ Partials 1154 1126 -28
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Yicong-Huang
left a comment
There was a problem hiding this comment.
Good change! But I would kindly ask you to provide tests for all those format utils. The coverage is quite low currently.
I added tests for the format utils. For the component call sites, adding tests would require quite a bit of setup, so it felt beyond the scope of this PR and I didn't include those tests. Thanks! |
What changes were proposed in this PR?
This PR extracts duplicated
formatCountand relative-time formatting logic into the sharedformat.util.tsutility file, and updates inline usages to use the shared utilities. No behavior change.Any related issues, documentation, discussions?
Closes #5218
How was this PR tested?
Existing automated tests passed.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7