[Property Column] Remove boxing when formatting the property.#4070
Merged
vnbaaij merged 6 commits intomicrosoft:devfrom Aug 28, 2025
Tyme-Bleyaert:feat/property-column/prevent-boxing-on-fomat
Merged
[Property Column] Remove boxing when formatting the property.#4070vnbaaij merged 6 commits intomicrosoft:devfrom Tyme-Bleyaert:feat/property-column/prevent-boxing-on-fomat
vnbaaij merged 6 commits intomicrosoft:devfrom
Tyme-Bleyaert:feat/property-column/prevent-boxing-on-fomat
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the boxing overhead when formatting property values in the PropertyColumn component by implementing type-specific formatters through reflection. It addresses the TODO comment about avoiding boxing value types when calling IFormattable.ToString().
- Replaces generic boxing approach with specialized formatters for nullable value types, value types, and reference types
- Adds comprehensive test coverage for all formatter scenarios including error cases
- Removes unnecessary else clause in the non-formatting path
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| PropertyColumn.cs | Implements type-specific formatters using reflection to avoid boxing, adds CreateFormatter method and specialized formatting helpers |
| PropertyColumnFormatterTests.razor.cs | Adds test infrastructure with Person record and CustomFormattable class for testing different formatting scenarios |
| PropertyColumnFormatterTests.razor | Provides test cases covering value types, nullable types, reference types, and error conditions |
Comments suppressed due to low confidence (2)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Collaborator
|
Need to take a proper look at it from a PC. Won't be near one for the next week and a half... |
vnbaaij
approved these changes
Aug 28, 2025
Merged
dvoituron
pushed a commit
that referenced
this pull request
Oct 6, 2025
vnbaaij
added a commit
that referenced
this pull request
Oct 8, 2025
* Implement #4036 * Implement #4070 * Implement #4112 * Implement #4116 * Add extra test. Brings back code coverage to 100% for Row and Cell * Implement #4172 * Implement #4177 * - Remove NoTabbing parameter (not being used) - Exclude ErrorContent from code coverage - Add (partial) ErrorContentTest, add IsFixed test, update tests * Implement #4178 Related Work Items: #41 * Add CustomIcon and IconsExtensions + tests --------- Co-authored-by: Denis Voituron <dvoituron@outlook.com>
This was referenced Nov 3, 2025
Closed
This was referenced Nov 17, 2025
Merged
This was referenced Dec 1, 2025
Merged
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.
Pull Request
📖 Description
This pr will remove the TODO from the property column about boxing value types when using a format.
📑 Test Plan
Added test cases for each type of format (nullable value types, value types and reference types).
Also added test to check if exception is thrown.
✅ Checklist
General
Component-specific