also looking at this
fix(mobile): preserve native editing, navigation, and durable media requests
#369
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.
| @@ -40,7 +40,8 @@ test('encodes shared grid counts as the unsigned integer fields in the native AB | ||
| 40 | 40 | const template = await Bun.file(new URL('../templates/MainActivityNative.kt.template', import.meta.url)).text() |
| 41 | 41 | const columns = template.match(/^[^\n]*put(?:Enum)?\(base, 29, node\.gridColumns[^\n]*$/m)?.[0] |
| 42 | 42 | const rows = template.match(/^[^\n]*if \(explicitRowsAware\) put(?:Enum)?\(base, 34, [^\n]*$/m)?.[0] |
| 43 | if (!columns || !rows) throw new Error('Shared grid count serialization is missing') | |
| 43 | const directColumns = template.match(/^[^\n]*put(?:Enum)?\(base, 29, 1f?\)[^\n]*$/m)?.[0] | |
| 44 | if (!columns || !rows || !directColumns) throw new Error('Shared grid count serialization is missing') | |
| 44 | 45 | await runKotlinFixture(` |
| 45 | 46 | data class GridNode(val gridColumns: Int, val gridRows: Int?) |
| 46 | 47 | |
| @@ -55,6 +56,8 @@ ${columns} | ||
| 55 | 56 | ${rows} |
| 56 | 57 | check(nodeData[29].toRawBits() == 2) { "grid_columns is not encoded as u32" } |
| 57 | 58 | check(nodeData[34].toRawBits() == 3) { "grid_rows is not encoded as u32" } |
| 59 | ${directColumns} | |
| 60 | check(nodeData[29].toRawBits() == 1) { "direct layout grid_columns default is not encoded as u32" } | |
| 58 | 61 | println("PASS native grid counts retain the integer bit patterns consumed by Zig") |
| 59 | 62 | } |
| 60 | 63 | `) |
| @@ -1521,7 +1521,7 @@ internal class CraftNativeFlexLayout(context: Context) : LinearLayout(context) { | ||
| 1521 | 1521 | put(base, 26, padding[3].toFloat()) |
| 1522 | 1522 | put(base, 27, padding[0].toFloat()) |
| 1523 | 1523 | putEnum(base, 28, 0) |
| 1524 | put(base, 29, 1f) | |
| 1524 | putEnum(base, 29, 1) | |
| 1525 | 1525 | put(base, 30, if (root) rowGapValue else 0f) |
| 1526 | 1526 | put(base, 31, if (root) columnGapValue else 0f) |
| 1527 | 1527 | } |