Skip to content
TypeScript

fix(mobile): the iPhone Duo keeps list titles through folds and unfolds with its sidebar (#23144)

Julius Marminge801701db7acf
diff --git a/apps/mobile/deps/react-native-screens-5.0.0-t3.31.tgz b/apps/mobile/deps/react-native-screens-5.0.0-t3.31.tgz
deleted file mode 100644
index cdfcbbd90d2..00000000000
Binary files a/apps/mobile/deps/react-native-screens-5.0.0-t3.31.tgz and /dev/null differ
diff --git a/apps/mobile/deps/react-native-screens-5.0.0-t3.32.tgz b/apps/mobile/deps/react-native-screens-5.0.0-t3.32.tgz
new file mode 100644
index 00000000000..2ad23c97d24
Binary files /dev/null and b/apps/mobile/deps/react-native-screens-5.0.0-t3.32.tgz differ
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index 44a19af3378..94a32e35982 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -134,7 +134,7 @@
"react-native-pdf-jsi": "5.0.0",
"react-native-reanimated": "4.7.1",
"react-native-safe-area-context": "~5.10.1",
- "react-native-screens": "file:deps/react-native-screens-5.0.0-t3.31.tgz",
+ "react-native-screens": "file:deps/react-native-screens-5.0.0-t3.32.tgz",
"react-native-shiki-engine": "^0.3.12",
"react-native-svg": "15.16.0",
"react-native-webview": "14.0.1",
diff --git a/apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsx b/apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsx
index 059c88e26fa..aac3c4babca 100644
--- a/apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsx
+++ b/apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsx
@@ -224,7 +224,10 @@ function WorkspaceColumns(
collapsed.current = false;
}}
preferredDisplayMode={
- panes.primarySidebarVisible || (!layout.usesSplitView && !activeDetailKey)
+ // UIKit applies the mode as a collapsed split expands, before the new width reaches JS, so a
+ // collapsed split already carries the sidebar the expanded one will show.
+ (layout.usesSplitView ? panes.primarySidebarVisible : panes.primarySidebarWhenExpanded) ||
+ (!layout.usesSplitView && !activeDetailKey)
? "oneBesideSecondary"
: "secondaryOnly"
}
diff --git a/apps/mobile/src/lib/layout.ts b/apps/mobile/src/lib/layout.ts
index 8b1e344826e..111bb2b40fc 100644
--- a/apps/mobile/src/lib/layout.ts
+++ b/apps/mobile/src/lib/layout.ts
@@ -58,6 +58,8 @@ export interface Layout {
export interface WorkspacePaneLayout {
readonly primarySidebarVisible: boolean;
+ /** Whether the sidebar shows once a collapsed split expands; independent of the current width. */
+ readonly primarySidebarWhenExpanded: boolean;
readonly primarySidebarSuppressedByAuxiliary: boolean;
readonly contentPaneWidth: number;
readonly supportsAuxiliaryPane: boolean;
@@ -215,6 +217,7 @@ export function deriveWorkspacePaneLayout(input: {
return {
primarySidebarVisible,
+ primarySidebarWhenExpanded: input.primarySidebarPreferredVisible,
primarySidebarSuppressedByAuxiliary,
contentPaneWidth: Math.max(0, viewportWidth - primarySidebarWidth),
supportsAuxiliaryPane: fileInspector.supported,
@@ -235,6 +238,7 @@ export function deriveWorkspacePaneLayout(input: {
return {
primarySidebarVisible: preferredPrimarySidebarVisible,
+ primarySidebarWhenExpanded: input.primarySidebarPreferredVisible,
primarySidebarSuppressedByAuxiliary: false,
contentPaneWidth,
supportsAuxiliaryPane,
diff --git a/docs/operations/mobile-screens-fork.md b/docs/operations/mobile-screens-fork.md
index 614aa4280cb..752ab55a595 100644
--- a/docs/operations/mobile-screens-fork.md
+++ b/docs/operations/mobile-screens-fork.md
@@ -1,7 +1,7 @@
# Building the mobile Screens dependency
The mobile v5 stack uses a committed tarball from the
-[T3 Screens fork](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.31).
+[T3 Screens fork](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.32).
The fork owns the integration changes; the app does not patch this package.
Each archive includes compiled JavaScript, declarations, native source and
`t3-fork.json` recording its version, source commit and upstream base.
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 475ae274e25..324fe06cac7 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -542,7 +542,7 @@ importers:
'@react-navigation/native-stack':
specifier: 7.21.0
- version: 7.21.0(patch_hash=990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42)(45e036a3bd680d99803578d5030f7a06)
+ version: 7.21.0(patch_hash=990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42)(44936b491df2f8e48d7e2f0a0b1f029f)
'@shikijs/core':
specifier: 4.2.0
version: 4.2.0
@@ -754,8 +754,8 @@ importers:
specifier: ~5.10.1
react-native-screens:
- specifier: file:deps/react-native-screens-5.0.0-t3.31.tgz
+ specifier: file:deps/react-native-screens-5.0.0-t3.32.tgz
react-native-shiki-engine:
specifier: ^0.3.12
@@ -10903,9 +10903,9 @@ packages:
react: '*'
react-native: '*'
- react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.31.tgz:
- resolution: {integrity: sha512-sz2DmEXcI1rhsPXm6MQsBNWlTT+sUp1x4pEwZWRlFY9UqUsn7J41M4xGlnrmSmN3ZiMZQyPxd55843EJzQ63nQ==, tarball: file:apps/mobile/deps/react-native-screens-5.0.0-t3.31.tgz}
- version: 5.0.0-t3.31
+ react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.32.tgz:
+ resolution: {integrity: sha512-Z/HpKvbEhsTdqyKyLBDaNPd6WD3ABrywypte09TMh5Cshq79Nlu41Bpyx96vm+pcdTXzaK8uB3fu29YdyeTAVQ==, tarball: file:apps/mobile/deps/react-native-screens-5.0.0-t3.32.tgz}
+ version: 5.0.0-t3.32
peerDependencies:
react: '*'
react-native: '*'
@@ -15967,7 +15967,7 @@ snapshots:
optionalDependencies:
- '@react-navigation/[email protected](patch_hash=990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42)(45e036a3bd680d99803578d5030f7a06)':
+ '@react-navigation/[email protected](patch_hash=990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42)(44936b491df2f8e48d7e2f0a0b1f029f)':
dependencies:
'@react-navigation/elements': 2.9.45(d8845bac868f4d8a58c8a8f12ad0d4a5)
@@ -15975,7 +15975,7 @@ snapshots:
react: 19.3.0
sf-symbols-typescript: 2.2.0
warn-once: 0.1.1
transitivePeerDependencies:
@@ -21580,7 +21580,7 @@ snapshots:
react: 19.3.0
dependencies:
react: 19.3.0
react-freeze: 1.0.4([email protected])