ReviewOS

also looking at this

craft-native/craft

fix(mobile): preserve native editing, navigation, and durable media requests

#369
Merged chris wants to merge codex/native-vertical-scroll-tab-swipes into main
36 files +864 -185

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

packages/android/fixtures/native-navigation/NativeNavigationTest.ktmodified+1-1
Changes to packages/android/fixtures/native-navigation/NativeNavigationTest.kt
@@ -1123,7 +1123,7 @@ class NativeNavigationTest {
11231123 val templateFirst = awaitView(activity, "grid-template-rows-first")
11241124 val templateThird = awaitView(activity, "grid-template-rows-third")
11251125 assertEquals(templateFirst.height, templateThird.height)
1126 assertTrue("explicit grid rows did not fill the definite height", templateThird.top - templateFirst.top > (30 * density).toInt())
1126 assertEquals("explicit grid rows did not fill the definite height", 44.0 * density, (templateThird.top - templateFirst.top).toDouble(), 1.0)
11271127 val fractionalGrid = awaitView(activity, "grid-fractional-wrap")
11281128 val fractionalFirst = awaitView(activity, "grid-fractional-first")
11291129 val fractionalSecond = awaitView(activity, "grid-fractional-second")
packages/android/templates/MainActivityNative.kt.templatemodified+2-2
Changes to packages/android/templates/MainActivityNative.kt.template
@@ -1105,9 +1105,9 @@ internal class CraftNativeFlexLayout(context: Context) : LinearLayout(context) {
11051105 val rowHeights = if (gridRows != null) {
11061106 val count = max(gridRows ?: 0, naturalRowHeights.size)
11071107 while (rows.size < count) rows.add(mutableListOf())
1108 val available = max(0, height - paddingTop - paddingBottom - max(0, count - 1) * rowGap).toFloat()
1108 val available = max(0f, (height - paddingTop - paddingBottom).toFloat() - max(0, count - 1) * rowGap)
11091109 val equal = available / max(1, count).toFloat()
1110 naturalRowHeights + List(count - naturalRowHeights.size) { equal }
1110 (naturalRowHeights + List(count - naturalRowHeights.size) { 0f })
11111111 .map { max(it, equal) }
11121112 } else naturalRowHeights
11131113 return GridLayout(rows, absolute, cellWidth, rowHeights)
packages/ios/fixtures/native-navigation/NativeNavigationUITests.swiftmodified+1-1
Changes to packages/ios/fixtures/native-navigation/NativeNavigationUITests.swift
@@ -618,7 +618,7 @@ final class NativeNavigationUITests: XCTestCase {
618618 let templateThird = app.otherElements["grid-template-rows-third"]
619619 XCTAssertTrue(templateRows.waitForExistence(timeout: 5) && templateFirst.exists && templateThird.exists)
620620 XCTAssertEqual(templateFirst.frame.height, templateThird.frame.height, accuracy: 2, "explicit grid rows did not use equal tracks")
621 XCTAssertGreaterThan(templateThird.frame.minY, templateFirst.frame.minY + 30, "explicit grid rows did not fill the definite height")
621 XCTAssertEqual(templateThird.frame.minY - templateFirst.frame.minY, 44, accuracy: 1, "explicit grid rows did not fill the definite height")
622622 let fractionalGrid = app.otherElements["grid-fractional-wrap"]
623623 let fractionalFirst = app.otherElements["grid-fractional-first"]
624624 let fractionalSecond = app.otherElements["grid-fractional-second"]