TypeScript
fix(mobile): Android sheets scroll to the end and keep their buttons on screen (#20284)
shivam2dd91140a98a
diff --git a/apps/mobile/src/components/ComposerContextSheet.tsx b/apps/mobile/src/components/ComposerContextSheet.tsxindex 28d852c788c..3f941d65aec 100644--- a/apps/mobile/src/components/ComposerContextSheet.tsx+++ b/apps/mobile/src/components/ComposerContextSheet.tsx@@ -185,6 +185,7 @@ export function ComposerContextSheet(props: {return (<Sheet title={terminal?.terminalLabel ?? props.label} onClose={props.onClose}><ScrollView+ nestedScrollEnabledclassName="flex-1"contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}contentContainerStyle={{diff --git a/apps/mobile/src/components/ui/Sheet.android.tsx b/apps/mobile/src/components/ui/Sheet.android.tsxindex 52cad92e0ab..230b5867db5 100644--- a/apps/mobile/src/components/ui/Sheet.android.tsx+++ b/apps/mobile/src/components/ui/Sheet.android.tsx@@ -18,9 +18,12 @@ export function Sheet(props: SheetProps) {onDismiss={props.onClose}onNativeDismiss={props.onClose}>- <View collapsable={false} className="flex-1 bg-sheet">+ {/* Flex children are not bounded by the FormSheet host on Android, so pin to its edges.+ Material coordinates drags with the first nested-scrolling view in native order. The Compose+ header has one, so the content comes first and column-reverse draws it below. */}+ <View collapsable={false} className="absolute inset-0 flex-col-reverse bg-sheet">+ <View className="flex-1">{props.children}</View><AndroidSheetHeader title={props.title} onBack={() => setIsOpen(false)} />- {props.children}</View></FormSheet>);diff --git a/apps/mobile/src/features/terminal/TerminalContextSheet.tsx b/apps/mobile/src/features/terminal/TerminalContextSheet.tsxindex d4a31c74732..c74bc685d34 100644--- a/apps/mobile/src/features/terminal/TerminalContextSheet.tsx+++ b/apps/mobile/src/features/terminal/TerminalContextSheet.tsx@@ -58,6 +58,7 @@ export function TerminalContextSheet(props: {return (<Sheet title="Terminal output" onClose={props.onClose}><ScrollView+ nestedScrollEnabledclassName="flex-1"contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}contentContainerStyle={{ paddingHorizontal: 20, paddingTop: 12, paddingBottom: 20 }}