-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(ModalDialog): add FooterContentTemplate parameter #5947
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 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 enhances the Modal component in BootstrapBlazor to support custom footer content by introducing a new parameter and corresponding layout updates.
- Adds a new FooterContentTemplate parameter in ModalDialog.razor.cs
- Updates ModalDialog.razor to conditionally render the new footer content template
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs | Introduces the new FooterContentTemplate parameter with relevant documentation |
| src/BootstrapBlazor/Components/Modal/ModalDialog.razor | Renders the new template inside a dedicated div for flexible footer customization |
Files not reviewed (1)
- src/BootstrapBlazor/Components/Modal/Modal.razor.scss: Language not supported
Comments suppressed due to low confidence (1)
src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs:206
- [nitpick] The new property 'FooterContentTemplate' is similar to the existing 'FooterTemplate'. Consider clarifying the distinct purposes of these two parameters in the documentation or renaming them to reduce potential confusion.
[Parameter] public RenderFragment? FooterContentTemplate { get; set; }
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 renaming
FooterContentTemplateto distinguish its purpose more clearly from the existingFooterTemplate. - Clarify the behavior when both
FooterTemplateandFooterContentTemplateare provided.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 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 #5947 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 669 669
Lines 30544 30548 +4
Branches 4347 4348 +1
=========================================
+ Hits 30544 30548 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: FelixYe <[email protected]>
Link issues
fixes #5942
Summary By Copilot
This pull request introduces enhancements to the
Modalcomponent in theBootstrapBlazorlibrary, focusing on improving the customization and layout of the modal footer. The changes include adding a newFooterContentTemplateparameter, updating the modal footer layout to support flexible content, and modifying the corresponding Razor and SCSS files.Enhancements to modal footer customization:
src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs: Added a new[Parameter]propertyFooterContentTemplateto allow users to define custom content in the modal footer. The default value isnull.src/BootstrapBlazor/Components/Modal/ModalDialog.razor: Updated the modal footer to render the newFooterContentTemplateinside adivwith the classmodal-footer-content, ensuring flexible placement of custom content.Layout improvements for modal footer:
src/BootstrapBlazor/Components/Modal/Modal.razor.scss: Added a new.modal-footer-contentclass with styles for flexible layout, including properties likeflex-grow,white-space: nowrap, andoverflow: hidden, to ensure proper alignment and handling of custom footer content.Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add a new FooterContentTemplate parameter to the ModalDialog component to enable more flexible footer content customization
New Features:
Enhancements: