-
-
Notifications
You must be signed in to change notification settings - Fork 364
feat(TableColumn): add IgnoreWhenExport parameter #6011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis pull request introduces an File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this 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 introduces the new IgnoreWhenExport property to the table column implementations in the BootstrapBlazor library so that columns can be conditionally excluded during export operations. The key changes include:
- Adding the IgnoreWhenExport property to interfaces and classes (ITableColumn, TableColumn, InternalTableColumn, AutoGenerateColumnAttribute).
- Updating the helper methods and copy logic to support the new property.
- Adding and updating unit tests to verify the new export filtering behavior.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTest/Utils/UtilityTest.cs | Updated tests to verify IgnoreWhenExport on generated table columns |
| test/UnitTest/Components/TableTest.cs | Added unit tests to assert export filtering of columns via IgnoreWhenExport |
| test/UnitTest/Components/InternalTableColumnTest.cs | Extended property assignments with IgnoreWhenExport |
| test/UnitTest/Attributes/AutoGenerateClassTest.cs | Updated tests for AutoGenerateColumn attribute ensuring IgnoreWhenExport propagates |
| src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs | Added support for IgnoreWhenExport in CopyValue and added GetIgnoreExport helper |
| src/BootstrapBlazor/Components/Table/TableColumn.cs | Introduced new parameter IgnoreWhenExport |
| src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs | Updated visible columns filtering to account for IgnoreWhenExport |
| src/BootstrapBlazor/Components/Table/InternalTableColumn.cs | Added the IgnoreWhenExport property |
| src/BootstrapBlazor/Components/Table/ITableColumn.cs | Extended the interface with IgnoreWhenExport property |
| src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs | Added the IgnoreWhenExport property to the attribute |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6011 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 670 670
Lines 30646 30651 +5
Branches 4361 4362 +1
=========================================
+ Hits 30646 30651 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ArgoZhang - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 2 issues found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Link issues
fixes #6009
Summary By Copilot
This pull request introduces a new property,
IgnoreWhenExport, across multiple classes and interfaces in theBootstrapBlazorlibrary. The property determines whether a column should be ignored during export operations. Additionally, related logic and unit tests have been updated to support and validate this new functionality.Feature Addition:
IgnoreWhenExportPropertyProperty Definition: Added the
IgnoreWhenExportproperty to theITableColumninterface and its implementations (AutoGenerateColumnAttribute,InternalTableColumn,TableColumn) to allow columns to be conditionally excluded during export operations. (src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs- [1]src/BootstrapBlazor/Components/Table/ITableColumn.cs- [2]src/BootstrapBlazor/Components/Table/InternalTableColumn.cs- [3]src/BootstrapBlazor/Components/Table/TableColumn.cs- [4]Helper Method: Introduced a new helper method,
GetIgnoreExport, in theITableColumnExtensionsclass to simplify the evaluation of theIgnoreWhenExportproperty. (src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs- src/BootstrapBlazor/Extensions/ITableColumnExtensions.csR347-R348)Logic Updates
Export Filtering: Updated the
GetVisibleColumnsmethod inTable.razor.Toolbar.csto exclude columns marked withIgnoreWhenExportduring export operations. (src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs- src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.csL473-R473)Property Copying: Modified the
CopyValuemethod inITableColumnExtensionsto include theIgnoreWhenExportproperty when copying column attributes. (src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs- src/BootstrapBlazor/Extensions/ITableColumnExtensions.csR114)Unit Tests
New Tests: Added unit tests to verify the functionality of the
IgnoreWhenExportproperty, including its behavior in column filtering and export scenarios. (test/UnitTest/Components/TableTest.cs- test/UnitTest/Components/TableTest.csR8211-R8241)Updated Tests: Enhanced existing tests to validate the inclusion of the
IgnoreWhenExportproperty in column definitions and its propagation across components. (test/UnitTest/Attributes/AutoGenerateClassTest.cs- [1] [2]test/UnitTest/Components/InternalTableColumnTest.cs- [3]test/UnitTest/Utils/UtilityTest.cs- [4]Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add a new
IgnoreWhenExportproperty to table columns to allow selective exclusion of columns during export operationsNew Features:
IgnoreWhenExportproperty for table columns to control column visibility during exportEnhancements:
IgnoreWhenExportpropertyTests:
IgnoreWhenExportfunctionality in table column filtering and export scenarios