Skip to content
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

Add iframe support #1

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Add iframe support #1

wants to merge 16 commits into from

Conversation

chrisvxd
Copy link
Member

@chrisvxd chrisvxd commented Feb 3, 2024

Add iframe support in a limited way that works for Puck:

Adds:

  • Support for ragging between droppables in different iframes
  • Support for scrolling iframes whilst dragging
  • Support for keyboard control between iframes
  • A new shouldRenderOriginal API for use with renderClone API (from an earlier legacy implementation, but still useful)

Does not add support for the following, as not required by Puck:

  • The renderClone API, which is required to enable items to retain viability when dragging between iframes

Considerations

  • The original implementation of this injected styles into all iframes via use-style-marshal. However, this was removed in favour of the user-land style syncing, such as via auto-frame-component.
  • renderClone doesn't work with iframes, which might be due to the implementation. Could explore playing around with the viewport state instead, but it wasn't necessary for our immediate requirements.

@chrisvxd chrisvxd force-pushed the iframes branch 3 times, most recently from 298e1e7 to 450d740 Compare February 11, 2024 18:33
@chrisvxd chrisvxd force-pushed the iframes branch 2 times, most recently from 070c75c to dd08e4a Compare February 28, 2024 17:53
This allows the user to explicitly disable displacement animations. For example, complex list objects can cause iOS GPU memory crashes in Safari when combined with iframes and CSS transforms, but disabling displacement animations fixes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant