-
-
Notifications
You must be signed in to change notification settings - Fork 363
refactor(Modal): remove dialog variable #5549
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 Guide by SourceryThis pull request refactors the Modal component by removing the dialog variable and making improvements to modal functionality and code consistency. The changes include removing the maximize button from draggable modals, cleaning up the modal close event handling, and ensuring consistent handling of the modal's original style. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Assessment against 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.
We encountered an error and are unable to review this PR. We have been notified and are working to fix it.
You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.
|
@sourcery-ai review |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5549 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 649 649
Lines 29607 29607
Branches 4173 4173
=========================================
Hits 29607 29607 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #5548
[Please fill in the relevant Issue number after the # above, such as #42]
[请在上方 # 后面填写相关 Issue 编号,如 #42]
Summary By Copilot
This pull request includes changes to the
Modals.razorandModal.razor.jsfiles to improve modal functionality and code consistency. The most important changes include removing the maximize button from draggable modals, cleaning up the modal close event handling, and ensuring consistent handling of the modal's original style.Improvements to modal functionality and code consistency:
src/BootstrapBlazor.Server/Components/Samples/Modals.razor: Removed theShowMaximizeButtonattribute from theModalDialogcomponent whenIsDraggableis set to true.src/BootstrapBlazor/Components/Modal/Modal.razor.js: Cleaned up the event handling code by removing unnecessary conditions and event listeners related to draggable modals in thehidden.bs.modalevent handler.src/BootstrapBlazor/Components/Modal/Modal.razor.js: Changed the condition checks formodal.originalStylefromvoid 0tonullfor consistency in thebackupBodyStyleandrestoreBodyStylefunctions.Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Refactors the Modal component to improve code consistency and remove unnecessary code. This includes removing the maximize button from draggable modals and cleaning up event handling.
Enhancements: