-
Notifications
You must be signed in to change notification settings - Fork 74
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
Update re-attached widget removes to use detach #2510
Conversation
85b814f
to
1920eef
Compare
This ensures that the host-side maintains their instances to correctly support re-attach.
1920eef
to
3b50c8b
Compare
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.
Nice!
...l-guest/src/commonMain/kotlin/app/cash/redwood/protocol/guest/DefaultGuestProtocolAdapter.kt
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
assertThat(composition.awaitSnapshot().filter { it !is ValueChange }).containsExactly( |
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.
Beautiful!
) | ||
|
||
state = 1 | ||
assertThat(composition.awaitSnapshot().filter { it !is ValueChange }).containsExactly( |
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.
The ValueChange
instances all target the new Column
here, right?
state = 1 | ||
assertThat(composition.awaitSnapshot().filter { it !is ValueChange }).containsExactly( | ||
// Box from Row | ||
ChildrenChange.Remove(Id(1), ChildrenTag(1), 0, detach = true), |
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.
YASS
) | ||
} | ||
|
||
@Test fun multipleMovableContentButOnlyOneReused() = runTest { |
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.
So cool
You made it look easy |
...-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/protocolGuestGeneration.kt
Outdated
Show resolved
Hide resolved
…ng/codegen/protocolGuestGeneration.kt
...l-guest/src/commonMain/kotlin/app/cash/redwood/protocol/guest/DefaultGuestProtocolAdapter.kt
Outdated
Show resolved
Hide resolved
…protocol/guest/DefaultGuestProtocolAdapter.kt
Extracting like 8 infrastructure PRs out from before it certainly helped! |
This ensures that the host-side maintains their instances to correctly support re-attach.
Closes #1902
movable.webm
CHANGELOG.md
's "Unreleased" section has been updated, if applicable.