Skip to content

Commit 7f29b62

Browse files
t3dotggclaude
andcommitted
feat(mobile): pin the Duo dismiss button next to the keyboard
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent f9edc53 commit 7f29b62

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

‎apps/mobile/src/native/V5StackHeader.ios.tsx‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,22 +234,26 @@ export function V5StackHeader(props: {
234234
trailing.push(compose);
235235
}
236236
// The vertical bar has no keyboard accessory row, so it carries its own dismiss. A regular-width
237-
// primary column draws a horizontal bar beside the detail column's vertical one.
237+
// primary column draws a horizontal bar beside the detail column's vertical one. The first
238+
// trailing item sits at the bar's far end; the flexible space keeps it next to the keyboard.
238239
if (
239240
keyboardVisible &&
240241
nativeMetrics &&
241242
nativeMetrics.verticalBarEdge !== "none" &&
242243
(props.column !== "primary" || nativeMetrics.horizontalSizeClass === "compact")
243244
) {
244-
if (trailing.length)
245-
trailing.push({ type: "spacer", id: "dismiss-keyboard-group", sizing: "fixed", width: 8 });
246-
trailing.push({
247-
type: "item",
248-
id: "dismiss-keyboard",
249-
title: "Dismiss keyboard",
250-
icon: { type: "sfSymbol", name: "keyboard.chevron.compact.down" },
251-
onPress: () => void KeyboardController.dismiss(),
252-
});
245+
trailing.unshift(
246+
{
247+
type: "item",
248+
id: "dismiss-keyboard",
249+
title: "Dismiss keyboard",
250+
icon: { type: "sfSymbol", name: "keyboard.chevron.compact.down" },
251+
onPress: () => void KeyboardController.dismiss(),
252+
// The folded bar is short; keep this out of the overflow menu.
253+
visibilityPriority: "high",
254+
},
255+
{ type: "spacer", id: "dismiss-keyboard-space", sizing: "flexible" },
256+
);
253257
}
254258
const left = options.headerLeft?.(itemProps);
255259
const right = options.headerRight?.(itemProps);

0 commit comments

Comments
 (0)