Skip to content

feat(EditDialog): add IsAsync on save button#7237

Merged
ArgoZhang merged 2 commits intomainfrom
feat-editform
Dec 3, 2025
Merged

feat(EditDialog): add IsAsync on save button#7237
ArgoZhang merged 2 commits intomainfrom
feat-editform

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Dec 3, 2025

Link issues

fixes #7236

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Enhancements:

  • Set the EditDialog save button to use the asynchronous button behavior.

Copilot AI review requested due to automatic review settings December 3, 2025 04:12
@bb-auto bb-auto bot added the enhancement New feature or request label Dec 3, 2025
@bb-auto bb-auto bot added this to the v10.1.0 milestone Dec 3, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 3, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds 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 EditDialog

sequenceDiagram
    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
Loading

Class diagram for EditDialog and async Button configuration

classDiagram
    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
Loading

File-Level Changes

Change Details Files
Configure the EditDialog save button to use asynchronous submission behavior.
  • Update the RenderFragment that builds the save button to include the IsAsync parameter on the Button component
  • Set the IsAsync parameter to true so the save button participates in async operation handling (e.g., loading/disabled state)
src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7236 Add the IsAsync property to the EditDialog save button so that the save action is treated as asynchronous.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ArgoZhang ArgoZhang merged commit 9fdd344 into main Dec 3, 2025
4 of 6 checks passed
@ArgoZhang ArgoZhang deleted the feat-editform branch December 3, 2025 04:12
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a 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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(EditDialog): add IsAsync on save button

2 participants