feat(CardUpload): add ShowFileSize parameter#7370
Merged
Conversation
|
Thanks for your PR, @momijijin. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a configurable ShowFileSize parameter to the CardUpload component to allow toggling display of file sizes in the UI, and updates markup and tests accordingly. Updated class diagram for CardUpload with ShowFileSize parameterclassDiagram
class CardUpload_TValue_ {
+RenderFragment_UploadFile_ ActionButtonTemplate
+bool ShowFileSize
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Currently the space before the size is always rendered even when
ShowFileSizeis false; you may want to move the space inside the conditional expression so the layout doesn’t include an extra trailing space when file size is hidden.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Currently the space before the size is always rendered even when `ShowFileSize` is false; you may want to move the space inside the conditional expression so the layout doesn’t include an extra trailing space when file size is hidden.
## Individual Comments
### Comment 1
<location> `test/UnitTest/Components/UploadCardTest.cs:21` </location>
<code_context>
{
pb.Add(a => a.ShowZoomButton, true);
pb.Add(a => a.ShowDeleteButton, true);
+ pb.Add(a => a.ShowFileSize, false);
pb.Add(a => a.OnDelete, file =>
{
</code_context>
<issue_to_address>
**issue (testing):** The new `ShowFileSize` parameter is set in the test but its behavior is not asserted.
`ShowFileSize` is only set to `false` in `CardUpload_Ok`, but the test doesn’t assert any resulting behavior (e.g., that the file-size element is hidden). Please extend this test or add a new one to assert the rendered DOM for both `ShowFileSize = true` and `ShowFileSize = false`, verifying that the file-size element is present by default and absent when disabled.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7370 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 747 747
Lines 32760 32765 +5
Branches 4540 4541 +1
=========================================
+ Hits 32760 32765 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ArgoZhang
previously approved these changes
Dec 18, 2025
ArgoZhang
approved these changes
Dec 19, 2025
This was referenced Dec 22, 2025
This was referenced Jan 7, 2026
This was referenced Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link issues
fixes #7369
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add a configurable option on the CardUpload component to control whether uploaded file sizes are displayed.
New Features:
Tests: