Skip to content

Commit f617022

Browse files
fix(mobile): only the composer's keyboard keeps the Android tab bar on its sliding sidebar
Other keyboards in split view, such as sidebar search or a Settings field, don't move the sidebar, so the bar hides for them as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent aabb8f5 commit f617022

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,7 @@ function AdaptiveWorkspaceLayoutContent(
10031003
nativeInspectorColumnWidth(viewportWidth, width / viewportWidth) / viewportWidth,
10041004
),
10051005
composerKeyboardActive,
1006+
keyboardHoldsSidebar,
10061007
setComposerEditing,
10071008
sidebarByOrientation,
10081009
workspacePageWidth,

‎apps/mobile/src/features/layout/adaptive-workspace-context.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ interface AdaptiveWorkspaceContextValue {
5858
* (the unfolded Duo). The native split switches between them as a rotation starts.
5959
*/
6060
readonly sidebarByOrientation: { readonly landscape: boolean; readonly portrait: boolean } | null;
61+
/** Android split: the composer's keyboard slides the sidebar, from focus until it lets go. */
62+
readonly keyboardHoldsSidebar?: boolean;
6163
/** Android split: the width a workspace page (Usage) opens at; null without columns. */
6264
readonly workspacePageWidth?: number | null;
6365
/** The thread composer reports its focus so the layout can make room for typing. */

‎apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function AndroidWorkspaceNavigation(props: {
8181
const toolbar = useToolbarLayout();
8282
const connectionState = useWorkspaceConnectionState();
8383
const keyboardVisible = useSoftKeyboardShowing();
84-
const { layout } = useAdaptiveWorkspaceLayout();
84+
const { layout, keyboardHoldsSidebar } = useAdaptiveWorkspaceLayout();
8585
const { themeAppearance, themeVariables: colors } = useAppearancePreferences();
8686
const { scale, fabSize } = useAndroidControlSizing();
8787
const window = useWindowDimensions();
@@ -102,8 +102,8 @@ export function AndroidWorkspaceNavigation(props: {
102102
(props.paneWidth ?? window.width) -
103103
(Math.max(insets.left, FLOATING_TABS.edge) - FLOATING_TABS.edge);
104104
const metrics = floatingTabsMetrics(tabs.length, scale, fabSize, barWidth, props.fillWidth);
105-
// In split view the bar rides the sidebar, which the keyboard slides away with it.
106-
if (!rail && keyboardVisible && !layout.usesSplitView) return null;
105+
// The composer's keyboard slides the sidebar away with the bar on it; other keyboards don't.
106+
if (!rail && keyboardVisible && !keyboardHoldsSidebar) return null;
107107

108108
return (
109109
<View

0 commit comments

Comments
 (0)