-
-
Notifications
You must be signed in to change notification settings - Fork 363
fix(Button): IsAsync parameter support wpf #5890
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
* fix(Button):修复WPF Blazor模式下Button组件IsAsync不工作 * chore: bump version beta03 Co-Authored-By: zglp <[email protected]> --------- Co-authored-by: zglp <[email protected]> Co-authored-by: Argo Zhang <[email protected]> Co-authored-by: zglp <[email protected]> # Conflicts: # src/BootstrapBlazor/BootstrapBlazor.csproj # src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs
Reviewer's Guide by SourceryThe pull request refactors the button click handlers in Sequence Diagram for Button Click Handling in Button.razor.cssequenceDiagram
participant User
participant Button
participant Handler
User->>Button: Click
activate Button
Button->>Handler: HandlerClick()
activate Handler
Handler-->>Button: Return
deactivate Handler
Button->>Button: Restore Button State (if IsAsync and ButtonType == ButtonType.Button)
Button-->>User: Update UI
deactivate Button
Sequence Diagram for Confirm Button Click Handling in PopConfirmButton.razor.cssequenceDiagram
participant User
participant PopConfirmButton
participant OnConfirmHandler
User->>PopConfirmButton: Click Confirm
activate PopConfirmButton
PopConfirmButton->>PopConfirmButton: Disable Button, Set IsAsyncLoading
PopConfirmButton->>OnConfirmHandler: OnConfirm()
activate OnConfirmHandler
OnConfirmHandler-->>PopConfirmButton: Return
deactivate OnConfirmHandler
PopConfirmButton->>PopConfirmButton: Handle ButtonType (Submit)
PopConfirmButton-->>User: Update UI
deactivate PopConfirmButton
Sequence Diagram for Button Click Handling in CountButton.cssequenceDiagram
participant User
participant CountButton
participant Handler
User->>CountButton: Click
activate CountButton
CountButton->>CountButton: Set IsAsyncLoading, IsDisabled
CountButton->>Handler: HandlerClick()
activate Handler
Handler-->>CountButton: Return
deactivate Handler
CountButton->>CountButton: UpdateCount()
CountButton->>CountButton: Reset IsDisabled, IsAsyncLoading
CountButton-->>User: Update UI
deactivate CountButton
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.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- It looks like you're removing the
IsAsynccheck andTask.Runcalls, but still settingIsDisabledandIsAsyncLoadingbased onIsAsync- can you confirm this is the intended behavior?
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 #5890 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 661 661
Lines 30430 30421 -9
Branches 4323 4321 -2
=========================================
- Hits 30430 30421 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #5863
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Modify button component handling of async operations to simplify and improve async click event processing
Bug Fixes:
Enhancements: