From cc3fb676555d3616ef13703b063ec41de2a78e21 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 1 Sep 2026 00:04:44 -0700 Subject: [PATCH 1/8] fix(mobile): keep thread scroll bounds current after animations --- .../lib/legend-list-size-animation.test.ts | 285 ++++++++++++++++++ patches/@legendapp__list@3.3.5.patch | 34 +-- pnpm-lock.yaml | 10 +- 3 files changed, 304 insertions(+), 25 deletions(-) create mode 100644 apps/mobile/src/lib/legend-list-size-animation.test.ts diff --git a/apps/mobile/src/lib/legend-list-size-animation.test.ts b/apps/mobile/src/lib/legend-list-size-animation.test.ts new file mode 100644 index 000000000000..48bd70ed381c --- /dev/null +++ b/apps/mobile/src/lib/legend-list-size-animation.test.ts @@ -0,0 +1,285 @@ +import * as NodeFS from "node:fs"; +import * as NodeVM from "node:vm"; +import * as TypeScript from "typescript"; +import { describe, expect, it } from "vite-plus/test"; + +import { createReactHookHarness } from "../../../web/src/test/reactHookHarness"; + +const bundles = ["reanimated.js", "reanimated.mjs"].map((name) => { + const path = new URL(`../../node_modules/@legendapp/list/${name}`, import.meta.url); + const source = NodeFS.readFileSync(path, "utf8"); + return { + name, + source: name.endsWith(".mjs") + ? TypeScript.transpileModule(source, { + compilerOptions: { + module: TypeScript.ModuleKind.CommonJS, + target: TypeScript.ScriptTarget.ESNext, + esModuleInterop: true, + }, + }).outputText + : source, + }; +}); + +type SizeSignal = "totalSize" | "alignItemsAtEndPadding"; +type NativeStyle = { readonly height?: number; readonly width?: number }; +type AnimatedStyle = { read: () => NativeStyle }; +type Style = NativeStyle | AnimatedStyle | ReadonlyArray