-
Notifications
You must be signed in to change notification settings - Fork 286
fix: add connectedMoveCallback to the WC implementation #170
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
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 support for atomic DOM moves to the Web Component implementation by implementing the connectedMoveCallback lifecycle method. This fixes issue #168 by preventing iframes from reloading when the <ui-resource-renderer> custom element is moved within the DOM using the moveBefore() API in browsers that support atomic moves.
- Extends the base Web Component class with
connectedMoveCallbackimplementation - Adds comprehensive test coverage for the new atomic move functionality
- Includes detailed documentation explaining the feature and its purpose
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
sdks/typescript/client/src/components/UIResourceRendererWC.tsx |
Refactors Web Component definition to use class extension pattern and adds empty connectedMoveCallback method to opt into atomic move behavior |
sdks/typescript/client/src/components/__tests__/UIResourceRendererWC.test.tsx |
Adds comprehensive test suite with 4 test cases covering method existence, invocation, element movement, and class instance verification |
idosal
left a comment
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.
Awesome!
…nt/v5.17.3) (2025-12-20) ### Bug Fixes * add connectedMoveCallback to the WC implementation ([#170](#170)) ([5ac4734](5ac4734))
|
🎉 This PR is included in version 5.17.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…/v5.18.0-alpha.1...client/v5.18.0-alpha.2) (2025-12-20) ### Bug Fixes * add connectedMoveCallback to the WC implementation ([#170](#170)) ([5ac4734](5ac4734))
|
🎉 This PR is included in version 5.18.0-alpha.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…/v5.17.0-alpha.1...server/v5.17.0-alpha.2) (2025-12-20) ### Bug Fixes * add connectedMoveCallback to the WC implementation ([#170](#170)) ([5ac4734](5ac4734))
|
🎉 This PR is included in version 5.17.0-alpha.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR adds an empty
connectedMoveCallbackmethod to the Web Component implementation, fixing #168 (thanks @JuanmanDev !).