-
-
Notifications
You must be signed in to change notification settings - Fork 362
feat(ImagePreviewer): move the body end prevent blocked #7034
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 (collapsed on small PRs)Reviewer's GuideAppend the ImagePreviewer container to document.body on initialization to prevent blocking issues and ensure proper teardown by removing it on dispose, alongside adding missing semicolons for consistent code formatting. Sequence diagram for ImagePreviewer initialization and disposalsequenceDiagram
participant JS as "ImagePreviewer.razor.js"
participant DOM as "document.body"
participant Data as "Data store"
participant Viewer as "Viewer module"
JS->>DOM: getElementById(id)
alt Element exists
JS->>Viewer: Viewer.init(el, prevList, config)
JS->>Data: Data.set(id, viewer)
JS->>DOM: appendChild(el)
end
Note over JS,DOM: On dispose
JS->>Data: Data.get(id)
JS->>Data: Data.remove(id)
alt viewer exists
JS->>Viewer: Viewer.dispose(viewer.viewer)
JS->>DOM: viewer.el.remove()
end
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.
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.
Pull Request Overview
This PR adds DOM manipulation and improves code consistency in the ImagePreviewer component by adding semicolons and implementing proper element lifecycle management.
Key Changes:
- Added semicolons for JavaScript best practices consistency
- Implemented element appending to document body during initialization
- Added element removal from DOM during disposal
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7034 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 743 743
Lines 32470 32470
Branches 4500 4500
=========================================
Hits 32470 32470
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #7033
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Append ImagePreviewer elements to document.body to prevent them from being blocked and ensure they are removed on disposal
Bug Fixes:
Enhancements: