Skip to content

Commit 2be4c92

Browse files
committed
fix(mobile): preserve iPad search chrome across layout changes
1 parent cc1e634 commit 2be4c92

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎apps/mobile/src/features/home/HomeRouteScreen.tsx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,15 @@ export function HomeRouteScreen() {
127127
options={
128128
Platform.OS === "android"
129129
? { headerShown: false }
130-
: { title: "", headerTitle: "", unstable_headerLeftItems: () => [] }
130+
: {
131+
title: "",
132+
headerTitle: "",
133+
unstable_headerLeftItems: () => [],
134+
// Options survive layout changes; search and settings now belong to the sidebar.
135+
headerSearchBarOptions: undefined,
136+
unstable_headerRightItems: () => [],
137+
unstable_headerToolbarItems: () => [],
138+
}
131139
}
132140
/>
133141
{Platform.OS === "ios" ? (

‎apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,9 @@ function AdaptiveWorkspaceLayoutContent(
472472
renderedSidebarWidth.value = withTiming(targetWidth, WORKSPACE_PANE_TIMING);
473473
}, [layout.listPaneWidth, panes.primarySidebarVisible, renderedSidebarWidth]);
474474
const sidebarAnimatedStyle = useAnimatedStyle(() => ({
475-
opacity: Math.min(1, renderedSidebarWidth.value / 80),
475+
// Fading a UIKit glass ancestor can leave remounted header effects missing.
476+
// The clipped width already reveals and hides the iOS sidebar.
477+
opacity: Platform.OS === "ios" ? 1 : Math.min(1, renderedSidebarWidth.value / 80),
476478
width: renderedSidebarWidth.value,
477479
}));
478480

0 commit comments

Comments
 (0)