feat(EditDialog): add IsAsync on save button#7237
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds asynchronous handling to the EditDialog save button by setting the underlying Button component’s IsAsync parameter to true, ensuring save operations are treated as async submissions. Sequence diagram for async save handling in EditDialogsequenceDiagram
actor User
participant EditDialog
participant Button
participant SaveHandler
User->>EditDialog: Open dialog
EditDialog->>Button: Render save button
Note over EditDialog,Button: Button.IsAsync = true
User->>Button: Click save
Button->>SaveHandler: Invoke async save handler
activate SaveHandler
SaveHandler-->>Button: Task completion
deactivate SaveHandler
Button-->>User: UI remains responsive during async save
Class diagram for EditDialog and async Button configurationclassDiagram
class EditDialog {
+ValueTask ToggleLoading(bool state)
+void BuildSaveButton(RenderTreeBuilder builder)
}
class Button {
+string Icon
+string Text
+ButtonType ButtonType
+bool IsAsync
+Task OnClickAsync()
}
EditDialog o-- Button : renders
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.
Hey there - I've reviewed your changes - here's some feedback:
- Consider exposing the
IsAsyncbehavior of the save button as a configurable parameter onEditDialograther than hard-coding it totrue, so consumers can opt out if they rely on synchronous behavior. - It may be worth reviewing other dialog/button usages (e.g., cancel/close buttons or other dialog components) for consistency in
IsAsyncbehavior, to avoid surprising differences in how buttons behave across similar components.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider exposing the `IsAsync` behavior of the save button as a configurable parameter on `EditDialog` rather than hard-coding it to `true`, so consumers can opt out if they rely on synchronous behavior.
- It may be worth reviewing other dialog/button usages (e.g., cancel/close buttons or other dialog components) for consistency in `IsAsync` behavior, to avoid surprising differences in how buttons behave across similar components.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
This PR adds async button functionality to the save button in EditDialog by setting IsAsync="true". This enables the automatic loading state and disabling behavior during form submission, providing better user feedback during save operations.
- Added
IsAsync="true"attribute to the EditDialog save button - Bumped version from 10.1.0 to 10.1.1-beta01
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs | Added IsAsync="true" attribute to the save button to enable automatic loading state during form submission |
| src/BootstrapBlazor/BootstrapBlazor.csproj | Bumped version to 10.1.1-beta01 to reflect the feature addition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Link issues
fixes #7236
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhancements: