Conversation
Reviewer's GuideAdds a simple string-based Footer parameter to SweetAlert components and wiring through SwalOption and SwalExtensions, updates the SweetAlertBody rendering to support either a template or text footer, and removes outdated XML remarks on Table.IsAutoRefresh. Sequence diagram for SweetAlert ShowModal footer propagationsequenceDiagram
actor User
participant SwalService
participant SwalExtensions
participant SweetAlertBody
User->>SwalService: Request SweetAlert with footer
SwalService->>SwalExtensions: ShowModal(service, option)
SwalExtensions->>SwalExtensions: Build parameters
SwalExtensions->>SweetAlertBody: Create with Title, Content, BodyTemplate, Footer, FooterTemplate, ButtonTemplate
SweetAlertBody->>SweetAlertBody: Render footer
alt FooterTemplate not null
SweetAlertBody->>SweetAlertBody: Display FooterTemplate
else FooterTemplate null and Footer not null
SweetAlertBody->>SweetAlertBody: Display Footer text
else FooterTemplate null and Footer null
SweetAlertBody->>SweetAlertBody: Render empty footer
end
Class diagram for updated SweetAlert footer optionsclassDiagram
class PopupOptionBase
class SwalOption {
+string? Title
+string? Content
+RenderFragment? BodyTemplate
+string? Footer
+RenderFragment? FooterTemplate
+RenderFragment? ButtonTemplate
}
class BootstrapComponentBase
class SweetAlertBody {
+string? Title
+string? Content
+RenderFragment? BodyTemplate
+string? Footer
+RenderFragment? FooterTemplate
+RenderFragment? ButtonTemplate
+bool ShowFooter
}
class SwalExtensions {
+Task~bool~ ShowModal(SwalService service, SwalOption option)
}
class SwalService
PopupOptionBase <|-- SwalOption
BootstrapComponentBase <|-- SweetAlertBody
SwalExtensions ..> SwalService : uses
SwalExtensions ..> SwalOption : uses
SwalExtensions ..> SweetAlertBody : sets_parameters
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7824 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 764 764
Lines 34122 34131 +9
Branches 4698 4699 +1
=========================================
+ Hits 34122 34131 +9
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:
|
There was a problem hiding this comment.
Pull request overview
Adds support for a text-based SweetAlert footer (in addition to the existing footer template) so callers can provide simple footer content without building a RenderFragment.
Changes:
- Add
Footer(string) toSwalOptionandSweetAlertBody, and pass it throughSwalExtensions.Parse. - Update
SweetAlertBodyrendering to showFooterTemplatewhen provided, otherwise render theFooterstring. - Remove the XML-doc
<remarks>forTable.IsAutoRefresh(unrelated to the Swal change).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/BootstrapBlazor/Extensions/SwalExtensions.cs | Passes the new Footer option through to SweetAlertBody parameters. |
| src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs | Introduces Footer string option on the public Swal configuration object. |
| src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs | Adds Footer as a component parameter with XML docs. |
| src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor | Renders FooterTemplate or falls back to the new Footer string. |
| src/BootstrapBlazor/Components/Table/Table.razor.cs | Removes IsAutoRefresh documentation remarks (appears unrelated to PR purpose). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Link issues
fixes #7823
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add support for configuring SweetAlert footer text via SwalOption and propagate it to the SweetAlertBody component.
New Features:
Enhancements: