-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
328ed1d
to
2fa42f6
Compare
11b67de
to
dd5c510
Compare
@@ -70,7 +69,7 @@ internal fun placeholderViewFactory(modifier: Modifier): ViewFactory<Any> = | |||
style = TextStyle( | |||
textAlign = TextAlign.Center, | |||
color = Color.White, | |||
shadow = Shadow(blurRadius = 5.px, color = Color.Black) | |||
shadow = Shadow(blurRadius = 5f, color = Color.Black) |
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 Px
type is being deleted, replaced with raw floats.
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.
Interesting. But…floats? Yuck.
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.
Yea, I'm not a fan either.
@@ -1,7 +1,7 @@ | |||
public final class com/squareup/workflow/ui/compose/ComposeRendering { | |||
public static final field Companion Lcom/squareup/workflow/ui/compose/ComposeRendering$Companion; | |||
public static final fun <clinit> ()V | |||
public fun <init> (Lkotlin/jvm/functions/Function2;)V | |||
public fun <init> (Lkotlin/jvm/functions/Function4;)V |
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.
These parameter count changes are due to the compiler changes that landed in dev12. See release notes for more info.
@@ -89,12 +90,8 @@ class WorkflowContainerTest { | |||
composeRule.setContent { | |||
WorkflowContainer(workflow, onOutput = { receivedOutputs += it }) { sendOutput -> | |||
Column { | |||
Clickable(onClick = { sendOutput("one") }) { |
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.
Clickable
has been deprecated.
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.
Seems in keeping with that Composable-as-Widget thought process.
): ComposeViewFactoryRoot = object : ComposeViewFactoryRoot { | ||
): ComposeViewFactoryRoot = ComposeViewFactoryRootImpl(wrapper) | ||
|
||
private class ComposeViewFactoryRootImpl( | ||
val wrapper: @Composable() (content: @Composable() () -> Unit) -> Unit | ||
) : ComposeViewFactoryRoot { |
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.
This change was required to get the root to recompose if a different instance is provided in the ViewEnvironment
between compose passes. See https://issuetracker.google.com/issues/157638284
@Pivotal workflow: Workflow<PropsT, OutputT, RenderingT>, | ||
workflow: Workflow<PropsT, OutputT, RenderingT>, | ||
props: PropsT, | ||
onOutput: (OutputT) -> Unit, | ||
@Pivotal coroutineContext: CoroutineContext, | ||
@Pivotal diagnosticListener: WorkflowDiagnosticListener?, | ||
coroutineContext: CoroutineContext, | ||
diagnosticListener: WorkflowDiagnosticListener?, | ||
snapshotKey: String? | ||
): State<RenderingT> { | ||
): State<RenderingT> = key(workflow, coroutineContext, diagnosticListener) { |
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.
@Pivotal
has been removed. key
existed before, but is now the only way to do this.
@@ -59,12 +60,13 @@ internal fun ViewGroup.setContent( | |||
parent: CompositionReference, | |||
content: @Composable() () -> Unit | |||
): Composition { | |||
FrameManager.ensureStarted() |
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.
All the changes in this file are to ensure this code stays as close as possible to the actual private code in the runtime.
ae4a5b8
to
1cdc2b5
Compare
da02136
to
8f348b0
Compare
8f348b0
to
f54fa51
Compare
Fixed broken UI tests (seems like a Compose bug on older Android versions, filed as https://issuetracker.google.com/issues/157728188) and linked an issue for the compiler crash. |
UI test failure seems to be due to emulator not starting. |
Release notes:
Note that
ComposeWorkflow
seems to break the compiler now, not sure why, but I've just disabled the module for now.