Skip to content

Conversation

@liady
Copy link
Collaborator

@liady liady commented Dec 20, 2025

This PR adds an empty connectedMoveCallback method to the Web Component implementation, fixing #168 (thanks @JuanmanDev !).

Copy link
Contributor

Copilot AI left a 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 connectedMoveCallback implementation
  • 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

Copy link
Collaborator

@idosal idosal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@idosal idosal merged commit 5ac4734 into main Dec 20, 2025
19 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 20, 2025
…nt/v5.17.3) (2025-12-20)

### Bug Fixes

* add connectedMoveCallback to the WC implementation ([#170](#170)) ([5ac4734](5ac4734))
@github-actions
Copy link

🎉 This PR is included in version 5.17.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request Dec 20, 2025
…/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))
@github-actions
Copy link

🎉 This PR is included in version 5.18.0-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request Dec 20, 2025
…/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))
@github-actions
Copy link

🎉 This PR is included in version 5.17.0-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants