-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(Table): add ToolbarTemplate parameter #5951
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 a Class diagram for Table updateclassDiagram
class `Table<TItem>` {
+RenderFragment? ToolbarTemplate
}
note for `Table<TItem>` "Added ToolbarTemplate parameter (RenderFragment?) to allow custom toolbar content."
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 a new customizable toolbar template feature for the Table component to allow developers to inject custom toolbar content. Key changes include:
- Adding a new RenderFragment? ToolbarTemplate parameter to the table component.
- Updating the Razor markup to conditionally render the toolbar template.
- Including unit tests to ensure the toolbar content is rendered as intended.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/UnitTest/Components/TableTest.cs | Added assertions for verifying the rendering of toolbar content. |
| src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs | Introduced the new ToolbarTemplate parameter with documentation. |
| src/BootstrapBlazor/Components/Table/Table.razor | Updated Razor markup to conditionally render the custom toolbar template. |
Files not reviewed (1)
- src/BootstrapBlazor/Components/Table/Table.razor.scss: Language not supported
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 - here's some feedback:
- Consider using a single flex container to manage the layout of the standard toolbar buttons and the new toolbar template, instead of separate floating elements.
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5951 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 669 669
Lines 30555 30559 +4
Branches 4348 4349 +1
=========================================
+ Hits 30555 30559 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #5950
Summary By Copilot
This pull request introduces a new customizable toolbar template feature for the
Tablecomponent in the BootstrapBlazor library. It includes updates to the component's Razor file, parameter definitions, styling, and unit tests to support and validate the new functionality.New Feature: Customizable Toolbar Template
Razor Component Update: Added conditional rendering for a new
ToolbarTemplatein theTable.razorfile, allowing developers to inject custom toolbar content. (src/BootstrapBlazor/Components/Table/Table.razor, src/BootstrapBlazor/Components/Table/Table.razorR72-R77)New Parameter: Introduced a
ToolbarTemplateparameter of typeRenderFragment?in theTable<TItem>class to enable the integration of custom toolbar templates. (src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs, src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.csR18-R23)Styling Enhancements
.table-toolbar-templateclass in the SCSS file to style the custom toolbar template, ensuring proper alignment and spacing. (src/BootstrapBlazor/Components/Table/Table.razor.scss, src/BootstrapBlazor/Components/Table/Table.razor.scssR714-R722)Unit Test Updates
TableTestclass to include a test case for the newToolbarTemplateparameter, verifying that the custom toolbar content is rendered correctly. (test/UnitTest/Components/TableTest.cs, test/UnitTest/Components/TableTest.csR563-R567)Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add a new customizable toolbar template feature to the Table component, allowing developers to inject custom toolbar content
New Features:
Enhancements:
Tests: