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

Support movableContentOf across protocol #1902

Open
JakeWharton opened this issue Mar 28, 2024 · 0 comments
Open

Support movableContentOf across protocol #1902

JakeWharton opened this issue Mar 28, 2024 · 0 comments

Comments

@JakeWharton
Copy link
Member

Currently, due to #1899, we crash when the detached subtree is re-added because children IDs clash. Even once that's fixed, we need to detect the fact that it's a reused node (probably with something like a removed=true boolean on the node) and upon re-insertion, walk its children and add them all to the map.

Once guest-side is fixed, we basically have the same problem host-side. It has the map leak that will cause the crash (#1900), but once that's fixed we need the same tree walk on re-attach.

It is unlikely that we will retain the host-side nodes across recompositions. If you are just moving the content in a single composition, however, we can send a new boolean in the remove op to signal that this is a detach with a future op performing re-attach via insertion. This will keep all nodes in the map, and only perform a re-parenting from the old children to the new children.

@JakeWharton JakeWharton added this to the 0.11.0 milestone Apr 4, 2024
@JakeWharton JakeWharton modified the milestones: 0.11.0, 0.12.0 May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant