-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: Remove need for timeout to close modal #8183
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 PR optimizes the modal closing process by removing a 150ms timeout and relocating the data bridge handling logic to Sequence diagram for modal closing process (before)sequenceDiagram
participant Browser
participant admin.base.js
participant close_frame.html
Browser->>close_frame.html: Triggers modal close
close_frame.html->>admin.base.js: Loads data bridge script
admin.base.js->>admin.base.js: Sets timeout (100-150ms)
admin.base.js->>admin.base.js: Executes data bridge after timeout
admin.base.js-->>Browser: Closes modal
Sequence diagram for modal closing process (after)sequenceDiagram
participant Browser
participant cms.modal.js
participant close_frame.html
Browser->>close_frame.html: Triggers modal close
close_frame.html->>cms.modal.js: Passes data bridge
cms.modal.js->>cms.modal.js: Executes data bridge immediately
cms.modal.js-->>Browser: Closes modal
File-Level Changes
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 @fsbraun - I've reviewed your changes - here's some feedback:
Overall Comments:
- It might be worth adding a comment explaining why the
dataBridge
check is necessary.
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.
Description
This PR takes 100 to 150ms out of the closing time of the modal by eliminating the need for a timeout.
Related resources
Checklist
main
Summary by Sourcery
Removes the need for a timeout when closing the modal, improving the closing time.
Enhancements:
admin.base.js
tocms.modal.js
to avoid the need for a timeout.