Repository: cashapp/redwood
Pull request #970 (2023-04-24 15:10:49)

Rename diff-consuming entrypoint to protocol prefix
Final link #968 

![Screen Shot 2023-04-24 at 11 03 14 AM](https://user-images.githubusercontent.com/66577/234038938-198a736b-c9ce-42e9-8f91-ef8168fca01b.png)



Patch:
diff --git a/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/protocolCodegen.kt b/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/protocolCodegen.kt
index 21567161c..269a638f4 100644
--- a/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/protocolCodegen.kt
+++ b/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/protocolCodegen.kt
@@ -39,7 +39,7 @@ public fun ProtocolSchemaSet.generate(type: ProtocolCodegenType, destination: Pa
       }
     }
     Widget -> {
-      generateDiffConsumingNodeFactory(this).writeTo(destination)
+      generateProtocolNodeFactory(this).writeTo(destination)
       generateWidgetProtocolLayoutModifierSerialization(this).writeTo(destination)
       for (dependency in all) {
         generateProtocolLayoutModifierImpls(dependency, host = schema).writeTo(destination)
diff --git a/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/sharedHelpers.kt b/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/sharedHelpers.kt
index 78b65025a..acdc0a6b4 100644
--- a/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/sharedHelpers.kt
+++ b/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/sharedHelpers.kt
@@ -84,8 +84,8 @@ internal fun Schema.protocolWidgetType(widget: Widget, host: Schema): ClassName
   return ClassName(composePackage(host), "Protocol${widget.type.flatName}")
 }
 
-internal fun Schema.diffConsumingNodeFactoryType(): ClassName {
-  return ClassName(widgetPackage(), "${type.flatName}DiffConsumingNodeFactory")
+internal fun Schema.protocolNodeFactoryType(): ClassName {
+  return ClassName(widgetPackage(), "${type.flatName}ProtocolNodeFactory")
 }
 
 internal fun Schema.protocolNodeType(widget: Widget, host: Schema): ClassName {
diff --git a/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/widgetProtocolGeneration.kt b/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/widgetProtocolGeneration.kt
index 524ffaa0e..11f91ea4e 100644
--- a/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/widgetProtocolGeneration.kt
+++ b/redwood-tooling-codegen/src/main/kotlin/app/cash/redwood/tooling/codegen/widgetProtocolGeneration.kt
@@ -36,20 +36,20 @@ import com.squareup.kotlinpoet.TypeName
 import com.squareup.kotlinpoet.TypeSpec
 
 /*
-public class SunspotDiffConsumingNodeFactory<W : Any>(
+public class SunspotProtocolNodeFactory<W : Any>(
   private val provider: SunspotWidgetFactoryProvider<W>,
   private val json: Json = Json.Default,
   private val mismatchHandler: ProtocolMismatchHandler = ProtocolMismatchHandler.Throwing,
-) : DiffConsumingNode.Factory<W> {
+) : ProtocolNode.Factory<W> {
   override fun create(
     parentId: Id,
     parentChildren: Widget.Children<W>,
     tag: WidgetTag,
-  ): DiffConsumingNode<W>? = when (tag.value) {
-    1 -> DiffConsumingTextNode(parentId, parentChildren, delegate.Sunspot.Text(), json, mismatchHandler)
-    2 -> DiffConsumingButtonNode(parentId, parentChildren, delegate.Sunspot.Button(), json, mismatchHandler)
-    1_000_001 -> DiffConsumingRedwoodLayoutRowNode(parentId, parentChildren, delegate.RedwoodLayout.Row(), json, mismatchHandler)
-    1_000_002 -> DiffConsumingRedwoodLayoutColumnNode(parentId, parentChildren, delegate.RedwoodLayout.Column(), json, mismatchHandler)
+  ): ProtocolNode<W>? = when (tag.value) {
+    1 -> TextProtocolNode(parentId, parentChildren, delegate.Sunspot.Text(), json, mismatchHandler)
+    2 -> ButtonProtocolNode(parentId, parentChildren, delegate.Sunspot.Button(), json, mismatchHandler)
+    1_000_001 -> RedwoodLayoutRowProtocolNode(parentId, parentChildren, delegate.RedwoodLayout.Row(), json, mismatchHandler)
+    1_000_002 -> RedwoodLayoutColumnProtocolNode(parentId, parentChildren, delegate.RedwoodLayout.Column(), json, mismatchHandler)
     else -> {
       mismatchHandler.onUnknownWidget(tag)
       null
@@ -57,12 +57,12 @@ public class SunspotDiffConsumingNodeFactory<W : Any>(
   }
 }
 */
-internal fun generateDiffConsumingNodeFactory(
+internal fun generateProtocolNodeFactory(
   schemaSet: ProtocolSchemaSet,
 ): FileSpec {
   val schema = schemaSet.schema
   val provider = schema.getWidgetFactoryProviderType().parameterizedBy(typeVariableW)
-  val type = schema.diffConsumingNodeFactoryType()
+  val type = schema.protocolNodeFactoryType()
   return FileSpec.builder(type)
     .addType(
       TypeSpec.classBuilder(type)
@@ -139,7 +139,7 @@ internal class ProtocolButton<W : Any>(
   private val delegate: Button<W>,
   private val json: Json,
   private val mismatchHandler: ProtocolMismatchHandler,
-) : DiffConsumingNode<W> {
+) : ProtocolNode<W> {
   public override val value: W get() = delegate.value
 
   public override val layoutModifiers: LayoutModifier
diff --git a/samples/emoji-search/android-composeui/src/main/java/com/example/redwood/emojisearch/android/composeui/EmojiSearchActivity.kt b/samples/emoji-search/android-composeui/src/main/java/com/example/redwood/emojisearch/android/composeui/EmojiSearchActivity.kt
index c8263d2ed..517ff3cea 100644
--- a/samples/emoji-search/android-composeui/src/main/java/com/example/redwood/emojisearch/android/composeui/EmojiSearchActivity.kt
+++ b/samples/emoji-search/android-composeui/src/main/java/com/example/redwood/emojisearch/android/composeui/EmojiSearchActivity.kt
@@ -34,7 +34,7 @@ import app.cash.zipline.loader.asZiplineHttpClient
 import app.cash.zipline.loader.withDevelopmentServerPush
 import com.example.redwood.emojisearch.launcher.EmojiSearchAppSpec
 import com.example.redwood.emojisearch.treehouse.EmojiSearchPresenter
-import com.example.redwood.emojisearch.widget.EmojiSearchDiffConsumingNodeFactory
+import com.example.redwood.emojisearch.widget.EmojiSearchProtocolNodeFactory
 import com.example.redwood.emojisearch.widget.EmojiSearchWidgetFactories
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.cancel
@@ -56,7 +56,7 @@ class EmojiSearchActivity : ComponentActivity() {
       override fun widgetFactory(
         json: Json,
         protocolMismatchHandler: ProtocolMismatchHandler,
-      ) = EmojiSearchDiffConsumingNodeFactory<@Composable () -> Unit>(
+      ) = EmojiSearchProtocolNodeFactory<@Composable () -> Unit>(
         provider = EmojiSearchWidgetFactories(
           EmojiSearch = AndroidEmojiSearchWidgetFactory(treehouseApp),
           RedwoodLayout = ComposeUiRedwoodLayoutWidgetFactory(),
diff --git a/samples/emoji-search/android-views/src/main/java/com/example/redwood/emojisearch/android/views/EmojiSearchActivity.kt b/samples/emoji-search/android-views/src/main/java/com/example/redwood/emojisearch/android/views/EmojiSearchActivity.kt
index e62f3b2e8..c8b6b13df 100644
--- a/samples/emoji-search/android-views/src/main/java/com/example/redwood/emojisearch/android/views/EmojiSearchActivity.kt
+++ b/samples/emoji-search/android-views/src/main/java/com/example/redwood/emojisearch/android/views/EmojiSearchActivity.kt
@@ -32,7 +32,7 @@ import app.cash.zipline.loader.asZiplineHttpClient
 import app.cash.zipline.loader.withDevelopmentServerPush
 import com.example.redwood.emojisearch.launcher.EmojiSearchAppSpec
 import com.example.redwood.emojisearch.treehouse.EmojiSearchPresenter
-import com.example.redwood.emojisearch.widget.EmojiSearchDiffConsumingNodeFactory
+import com.example.redwood.emojisearch.widget.EmojiSearchProtocolNodeFactory
 import com.example.redwood.emojisearch.widget.EmojiSearchWidgetFactories
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.cancel
@@ -54,7 +54,7 @@ class EmojiSearchActivity : ComponentActivity() {
       override fun widgetFactory(
         json: Json,
         protocolMismatchHandler: ProtocolMismatchHandler,
-      ) = EmojiSearchDiffConsumingNodeFactory(
+      ) = EmojiSearchProtocolNodeFactory(
         provider = EmojiSearchWidgetFactories(
           EmojiSearch = AndroidEmojiSearchWidgetFactory(
             context = context,
diff --git a/samples/emoji-search/ios-shared/src/commonMain/kotlin/com/example/redwood/emojisearch/ios/exposed.kt b/samples/emoji-search/ios-shared/src/commonMain/kotlin/com/example/redwood/emojisearch/ios/exposed.kt
index 7384dbe3e..8ac3948a0 100644
--- a/samples/emoji-search/ios-shared/src/commonMain/kotlin/com/example/redwood/emojisearch/ios/exposed.kt
+++ b/samples/emoji-search/ios-shared/src/commonMain/kotlin/com/example/redwood/emojisearch/ios/exposed.kt
@@ -26,7 +26,7 @@ import app.cash.redwood.treehouse.TreehouseView
 import app.cash.redwood.treehouse.TreehouseView.WidgetSystem
 import app.cash.redwood.treehouse.bindWhenReady
 import app.cash.redwood.treehouse.lazylayout.uiview.UIViewRedwoodTreehouseLazyLayoutWidgetFactory
-import com.example.redwood.emojisearch.widget.EmojiSearchDiffConsumingNodeFactory
+import com.example.redwood.emojisearch.widget.EmojiSearchProtocolNodeFactory
 import com.example.redwood.emojisearch.widget.EmojiSearchWidgetFactories
 import com.example.redwood.emojisearch.widget.EmojiSearchWidgetFactory
 import okio.ByteString
@@ -38,12 +38,12 @@ import platform.Foundation.NSData
 fun exposedTypes(
   emojiSearchLauncher: EmojiSearchLauncher,
   emojiSearchWidgetFactory: EmojiSearchWidgetFactory<*>,
+  protocolNodeFactory: EmojiSearchProtocolNodeFactory<*>,
   treehouseUIKitView: TreehouseUIKitView,
   uiViewRedwoodLayoutWidgetFactory: UIViewRedwoodLayoutWidgetFactory,
   uiViewRedwoodTreehouseLazyLayoutWidgetFactory: UIViewRedwoodTreehouseLazyLayoutWidgetFactory<*>,
   widgetSystem: WidgetSystem,
   widgetFactories: EmojiSearchWidgetFactories<*>,
-  diffConsumingNodeFactory: EmojiSearchDiffConsumingNodeFactory<*>,
 ) {
   throw AssertionError()
 }
diff --git a/samples/emoji-search/ios-uikit/EmojiSearchApp/EmojiSearchViewController.swift b/samples/emoji-search/ios-uikit/EmojiSearchApp/EmojiSearchViewController.swift
index b2fd6bbd1..5940cc497 100644
--- a/samples/emoji-search/ios-uikit/EmojiSearchApp/EmojiSearchViewController.swift
+++ b/samples/emoji-search/ios-uikit/EmojiSearchApp/EmojiSearchViewController.swift
@@ -64,7 +64,7 @@ class EmojiSearchWidgetSystem : TreehouseViewWidgetSystem {
         json: Kotlinx_serialization_jsonJson,
         protocolMismatchHandler: ProtocolMismatchHandler
     ) -> ProtocolNodeFactory {
-        return ProtocolEmojiSearchDiffConsumingNodeFactory<UIView>(
+        return ProtocolEmojiSearchProtocolNodeFactory<UIView>(
             provider: WidgetEmojiSearchWidgetFactories<UIView>(
                 EmojiSearch: IosEmojiSearchWidgetFactory(treehouseApp: treehouseApp, widgetSystem: self),
                 RedwoodLayout: UIViewRedwoodLayoutWidgetFactory(),
diff --git a/samples/repo-search/android-views/src/main/java/com/example/redwood/reposearch/android/views/RepoSearchActivity.kt b/samples/repo-search/android-views/src/main/java/com/example/redwood/reposearch/android/views/RepoSearchActivity.kt
index e6a1def32..4aa93c9af 100644
--- a/samples/repo-search/android-views/src/main/java/com/example/redwood/reposearch/android/views/RepoSearchActivity.kt
+++ b/samples/repo-search/android-views/src/main/java/com/example/redwood/reposearch/android/views/RepoSearchActivity.kt
@@ -32,7 +32,7 @@ import app.cash.zipline.loader.asZiplineHttpClient
 import app.cash.zipline.loader.withDevelopmentServerPush
 import com.example.redwood.reposearch.launcher.RepoSearchAppSpec
 import com.example.redwood.reposearch.treehouse.RepoSearchPresenter
-import com.example.redwood.reposearch.widget.RepoSearchDiffConsumingNodeFactory
+import com.example.redwood.reposearch.widget.RepoSearchProtocolNodeFactory
 import com.example.redwood.reposearch.widget.RepoSearchWidgetFactories
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.cancel
@@ -54,7 +54,7 @@ class RepoSearchActivity : ComponentActivity() {
       override fun widgetFactory(
         json: Json,
         protocolMismatchHandler: ProtocolMismatchHandler,
-      ) = RepoSearchDiffConsumingNodeFactory(
+      ) = RepoSearchProtocolNodeFactory(
         provider = RepoSearchWidgetFactories(
           RepoSearch = AndroidRepoSearchWidgetFactory(context),
           RedwoodLayout = ViewRedwoodLayoutWidgetFactory(context),


Test patch:
diff --git a/redwood-layout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt b/redwood-layout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt
index 6a85a3be2..0d8f038f6 100644
--- a/redwood-layout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt
+++ b/redwood-layout-composeui/src/androidUnitTest/kotlin/app/cash/redwood/layout/composeui/ComposeUiFlexContainerTest.kt
@@ -44,6 +44,7 @@ class ComposeUiFlexContainerTest : AbstractFlexContainerTest<@Composable () -> U
   val paparazzi = Paparazzi(
     deviceConfig = DeviceConfig.PIXEL_6,
     theme = "android:Theme.Material.Light.NoActionBar",
+    showSystemUi = false,
   )
 
   override fun flexContainer(direction: FlexDirection) = ComposeTestFlexContainer(direction)
diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentCenter.png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentCenter.png
index 46d9064ae..60ec3e64e 100644
--- a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentCenter.png
+++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentCenter.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:2f0d5568b298259db005ebfe33a3817f4b4bc5d54311906a2b9b76b7425c54be
-size 58208
+oid sha256:c3811d2a2f10af21032783907135da2853b0c0751dffdbf1961bac5c725e47da
+size 55273
diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentSpaceAround.png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentSpaceAround.png
index 0d6a93031..f08537ec0 100644
--- a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentSpaceAround.png
+++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentSpaceAround.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:66409be678b4724d7fc2d97cf9373cc351d176f191c3c04ef7253ab02165f829
-size 58637
+oid sha256:0e27dfd02b1114abd0c73ece0c22d3468dbe69ad926186384945c3a7d3e8871a
+size 55071
diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentSpaceBetween.png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentSpaceBetween.png
index 0878efa44..e19952201 100644
--- a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentSpaceBetween.png
+++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithJustifyContentSpaceBetween.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:25772f9965122b14513716a1eb7d856f147544d69cabf2c59e95e4d84f9f47d3
-size 58553
+oid sha256:b20cc7742554f73071e1de9b6b948498de60e55fc73b14e0e8468780a6d8ab90
+size 55832
diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithMarginAndDifferentAlignments.png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithMarginAndDifferentAlignments.png
index 8f123711b..e6c6b9a46 100644
--- a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithMarginAndDifferentAlignments.png
+++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_columnWithMarginAndDifferentAlignments.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:17a9f5e640c7dc00361ef8485d682ab3880764c67dd6f4d6694820c83551a3f3
-size 58455
+oid sha256:7fadd902a58a693b6bd8838f7ca20cdfba4219ed210e3479a5b0650419560b15
+size 55647
diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_longColumn.png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_longColumn.png
index 81bcfac13..df21e6ed8 100644
--- a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_longColumn.png
+++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_longColumn.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:4a525c9bc0eca98962eb6c14f6a7126d4510f6d8e282b7b42a7f20b0ef3ef75d
-size 57551
+oid sha256:e84b8bdba6cbb2a84c8bcba44356c87dae452c405643e58367811249dd240fbc
+size 54913
diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_longRow.png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_longRow.png
index cc1d13cb3..d3554d744 100644
--- a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_longRow.png
+++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_longRow.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:7c4899c29d0971098592db3aefbe4350ba371de0b0184975dc1b8df30f94794d
-size 11277
+oid sha256:6ee386a168f7c2685e9594316a4b42fbbfba192e8df2d93e881ac0c08f87ebc6
+size 8107
diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_shortColumn.png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_shortColumn.png
index f4330211d..6f1cd855e 100644
--- a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_shortColumn.png
+++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_shortColumn.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a4d8481ac9be30a48c64431f2d7623aac799c973c1d373ee3582fcc77f3f1f8a
-size 19442
+oid sha256:df557299fb750f451225c24f2c524c35f1941010059eb03899919c0622cd4ade
+size 16327
diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_shortRow.png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_shortRow.png
index ea9471653..b899ee2ef 100644
--- a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_shortRow.png
+++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_shortRow.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:58490533159e93f5e21b5be494d797c09a37b590280975a5b053e57a220e4c65
-size 13212
+oid sha256:fcbd3525432e408e98f6f4df6ab7bbe7ba6f8373cdc03e78de3eea168d236d07
+size 10078
diff --git a/redwood-layout-view/src/test/kotlin/app/cash/redwood/layout/view/ViewFlexContainerTest.kt b/redwood-layout-view/src/test/kotlin/app/cash/redwood/layout/view/ViewFlexContainerTest.kt
index 1a93304e4..6ad54c45a 100644
--- a/redwood-layout-view/src/test/kotlin/app/cash/redwood/layout/view/ViewFlexContainerTest.kt
+++ b/redwood-layout-view/src/test/kotlin/app/cash/redwood/layout/view/ViewFlexContainerTest.kt
@@ -42,6 +42,7 @@ class ViewFlexContainerTest : AbstractFlexContainerTest<View>() {
   val paparazzi = Paparazzi(
     deviceConfig = DeviceConfig.PIXEL_6,
     theme = "android:Theme.Material.Light.NoActionBar",
+    showSystemUi = false,
   )
 
   override fun flexContainer(direction: FlexDirection) = ViewTestFlexContainer(paparazzi.context, direction)
diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentCenter.png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentCenter.png
index 44bebb1cd..60ec3e64e 100644
--- a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentCenter.png
+++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentCenter.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a7b18f7e21bf232ee1efc1034b235736e3498800b6d6de7bb64201425ed3f293
-size 58250
+oid sha256:c3811d2a2f10af21032783907135da2853b0c0751dffdbf1961bac5c725e47da
+size 55273
diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentSpaceAround.png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentSpaceAround.png
index 232514dd9..f08537ec0 100644
--- a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentSpaceAround.png
+++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentSpaceAround.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:81136f2e53ac2986bfaf7e5c613602db9dc13360d82d0d08f9128a1e8d85ed95
-size 58683
+oid sha256:0e27dfd02b1114abd0c73ece0c22d3468dbe69ad926186384945c3a7d3e8871a
+size 55071
diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentSpaceBetween.png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentSpaceBetween.png
index 497375327..e19952201 100644
--- a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentSpaceBetween.png
+++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithJustifyContentSpaceBetween.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:bb4659734f27ba2e4674e040487b04e0b02bbf6809e3a1460226a74a2d661d0f
-size 58595
+oid sha256:b20cc7742554f73071e1de9b6b948498de60e55fc73b14e0e8468780a6d8ab90
+size 55832
diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithMarginAndDifferentAlignments.png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithMarginAndDifferentAlignments.png
index ec276a6ac..522b44ea5 100644
--- a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithMarginAndDifferentAlignments.png
+++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_columnWithMarginAndDifferentAlignments.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:b0162a025526a6cbee5cc0e81d27ebb41fea0d9f1607458c41e387bc2a1b6211
-size 58138
+oid sha256:9c081fa34850b46f43797b0c16b6814efd86ece66b406a88ec005d2ad5c737a2
+size 55407
diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_longColumn.png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_longColumn.png
index 8f0b30345..df21e6ed8 100644
--- a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_longColumn.png
+++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_longColumn.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:f6a3304e76c0b8df672bd389a880ee934160152fa8c221679e1ff1d79cb38f5e
-size 57585
+oid sha256:e84b8bdba6cbb2a84c8bcba44356c87dae452c405643e58367811249dd240fbc
+size 54913
diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_longRow.png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_longRow.png
index 891db12c5..1cd731ba3 100644
--- a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_longRow.png
+++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_longRow.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3c5972dcb6d9ae4c09459fb1de7fbe28c7876dbc3b68cd6b383d89cf69ca7d40
-size 28881
+oid sha256:33fcf9445259b5c07fbd79ca4c1de5d0eb16ff6bc59183f6c3fe3e2eb047dc00
+size 25837
diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_shortColumn.png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_shortColumn.png
index 6ec59f4ea..6f1cd855e 100644
--- a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_shortColumn.png
+++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_shortColumn.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:88207f43e107c0cad1079e7b70b866fa68ef48be6d851ff26e589a0a96721af2
-size 19487
+oid sha256:df557299fb750f451225c24f2c524c35f1941010059eb03899919c0622cd4ade
+size 16327
diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_shortRow.png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_shortRow.png
index 89b3f1d8f..0083caf7d 100644
--- a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_shortRow.png
+++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_shortRow.png
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3be3c7de862ead50b22594d7e4aacd6903e7039ef5dab0f217e72b61b324e1c8
-size 18828
+oid sha256:115e0a586d3fc56a8b64c029025aa8b10e7ec812a0ec633f69e1a9d0ec1efa69
+size 15592
diff --git a/redwood-protocol-widget/src/commonTest/kotlin/app/cash/redwood/protocol/widget/ProtocolBridgeTest.kt b/redwood-protocol-widget/src/commonTest/kotlin/app/cash/redwood/protocol/widget/ProtocolBridgeTest.kt
index f5645c435..4c0806cc1 100644
--- a/redwood-protocol-widget/src/commonTest/kotlin/app/cash/redwood/protocol/widget/ProtocolBridgeTest.kt
+++ b/redwood-protocol-widget/src/commonTest/kotlin/app/cash/redwood/protocol/widget/ProtocolBridgeTest.kt
@@ -21,7 +21,7 @@ import app.cash.redwood.protocol.Diff
 import app.cash.redwood.protocol.Id
 import app.cash.redwood.protocol.WidgetTag
 import app.cash.redwood.widget.MutableListChildren
-import example.redwood.widget.ExampleSchemaDiffConsumingNodeFactory
+import example.redwood.widget.ExampleSchemaProtocolNodeFactory
 import example.redwood.widget.ExampleSchemaWidgetFactories
 import kotlin.test.Test
 import kotlin.test.assertEquals
@@ -31,7 +31,7 @@ class ProtocolBridgeTest {
   @Test fun insertRootIdThrows() {
     val bridge = ProtocolBridge(
       container = MutableListChildren(),
-      factory = ExampleSchemaDiffConsumingNodeFactory(
+      factory = ExampleSchemaProtocolNodeFactory(
         provider = ExampleSchemaWidgetFactories(
           ExampleSchema = EmptyExampleSchemaWidgetFactory(),
           RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
@@ -59,7 +59,7 @@ class ProtocolBridgeTest {
   @Test fun duplicateIdThrows() {
     val bridge = ProtocolBridge(
       container = MutableListChildren(),
-      factory = ExampleSchemaDiffConsumingNodeFactory(
+      factory = ExampleSchemaProtocolNodeFactory(
         provider = ExampleSchemaWidgetFactories(
           ExampleSchema = EmptyExampleSchemaWidgetFactory(),
           RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
diff --git a/redwood-protocol-widget/src/commonTest/kotlin/app/cash/redwood/protocol/widget/ProtocolNodeFactoryTest.kt b/redwood-protocol-widget/src/commonTest/kotlin/app/cash/redwood/protocol/widget/ProtocolNodeFactoryTest.kt
index abf8ae229..0c9d01740 100644
--- a/redwood-protocol-widget/src/commonTest/kotlin/app/cash/redwood/protocol/widget/ProtocolNodeFactoryTest.kt
+++ b/redwood-protocol-widget/src/commonTest/kotlin/app/cash/redwood/protocol/widget/ProtocolNodeFactoryTest.kt
@@ -27,7 +27,7 @@ import app.cash.redwood.protocol.PropertyDiff
 import app.cash.redwood.protocol.PropertyTag
 import app.cash.redwood.protocol.WidgetTag
 import example.redwood.compose.TestScope
-import example.redwood.widget.ExampleSchemaDiffConsumingNodeFactory
+import example.redwood.widget.ExampleSchemaProtocolNodeFactory
 import example.redwood.widget.ExampleSchemaWidgetFactories
 import example.redwood.widget.TextInput
 import kotlin.test.Test
@@ -45,7 +45,7 @@ import kotlinx.serialization.modules.SerializersModule
 
 class ProtocolNodeFactoryTest {
   @Test fun unknownWidgetThrowsDefault() {
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       ExampleSchemaWidgetFactories(
         ExampleSchema = EmptyExampleSchemaWidgetFactory(),
         RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
@@ -60,7 +60,7 @@ class ProtocolNodeFactoryTest {
 
   @Test fun unknownWidgetCallsHandler() {
     val handler = RecordingProtocolMismatchHandler()
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = EmptyExampleSchemaWidgetFactory(),
         RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
@@ -80,7 +80,7 @@ class ProtocolNodeFactoryTest {
       }
     }
     val recordingTextInput = RecordingTextInput()
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = object : EmptyExampleSchemaWidgetFactory() {
           override fun TextInput() = recordingTextInput
@@ -114,7 +114,7 @@ class ProtocolNodeFactoryTest {
       }
     }
     val recordingTextInput = RecordingTextInput()
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = object : EmptyExampleSchemaWidgetFactory() {
           override fun TextInput() = recordingTextInput
@@ -142,7 +142,7 @@ class ProtocolNodeFactoryTest {
   }
 
   @Test fun unknownLayoutModifierThrowsDefault() {
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = EmptyExampleSchemaWidgetFactory(),
         RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
@@ -171,7 +171,7 @@ class ProtocolNodeFactoryTest {
     }
     val handler = RecordingProtocolMismatchHandler()
     val recordingTextInput = RecordingTextInput()
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = object : EmptyExampleSchemaWidgetFactory() {
           override fun TextInput() = recordingTextInput
@@ -208,7 +208,7 @@ class ProtocolNodeFactoryTest {
   }
 
   @Test fun unknownChildrenThrowsDefault() {
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = EmptyExampleSchemaWidgetFactory(),
         RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
@@ -224,7 +224,7 @@ class ProtocolNodeFactoryTest {
 
   @Test fun unknownChildrenCallsHandler() {
     val handler = RecordingProtocolMismatchHandler()
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = EmptyExampleSchemaWidgetFactory(),
         RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
@@ -245,7 +245,7 @@ class ProtocolNodeFactoryTest {
       }
     }
     val recordingTextInput = RecordingTextInput()
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = object : EmptyExampleSchemaWidgetFactory() {
           override fun TextInput() = recordingTextInput
@@ -263,7 +263,7 @@ class ProtocolNodeFactoryTest {
   }
 
   @Test fun unknownPropertyThrowsDefaults() {
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = EmptyExampleSchemaWidgetFactory(),
         RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
@@ -281,7 +281,7 @@ class ProtocolNodeFactoryTest {
 
   @Test fun unknownPropertyCallsHandler() {
     val handler = RecordingProtocolMismatchHandler()
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = EmptyExampleSchemaWidgetFactory(),
         RedwoodLayout = EmptyRedwoodLayoutWidgetFactory(),
@@ -302,7 +302,7 @@ class ProtocolNodeFactoryTest {
       }
     }
     val recordingTextInput = RecordingTextInput()
-    val factory = ExampleSchemaDiffConsumingNodeFactory(
+    val factory = ExampleSchemaProtocolNodeFactory(
       provider = ExampleSchemaWidgetFactories(
         ExampleSchema = object : EmptyExampleSchemaWidgetFactory() {
           override fun TextInput() = recordingTextInput
diff --git a/redwood-tooling-codegen/src/test/kotlin/app/cash/redwood/tooling/codegen/WidgetProtocolGenerationTest.kt b/redwood-tooling-codegen/src/test/kotlin/app/cash/redwood/tooling/codegen/WidgetProtocolGenerationTest.kt
index cf114db3a..d5846818b 100644
--- a/redwood-tooling-codegen/src/test/kotlin/app/cash/redwood/tooling/codegen/WidgetProtocolGenerationTest.kt
+++ b/redwood-tooling-codegen/src/test/kotlin/app/cash/redwood/tooling/codegen/WidgetProtocolGenerationTest.kt
@@ -51,7 +51,7 @@ class WidgetProtocolGenerationTest {
   @Test fun `names are sorted by their node tags`() {
     val schema = ProtocolSchemaSet.parse(SortedByTagSchema::class)
 
-    val fileSpec = generateDiffConsumingNodeFactory(schema)
+    val fileSpec = generateProtocolNodeFactory(schema)
     assertThat(fileSpec.toString()).containsMatch(
       Pattern.compile("1 ->[^2]+2 ->[^3]+3 ->[^1]+12 ->", MULTILINE),
     )