@@ -149,7 +149,7 @@ import { NATIVE_LIQUID_GLASS_SUPPORTED } from "./native/native-glass";
149149import { deriveLayout } from "./lib/layout" ;
150150import { useNativeLayoutMetrics } from "./native/native-layout-metrics" ;
151151import { nativeHeaderScrollEdgeEffects } from "./native/StackHeader" ;
152- import { FORM_SHEET_PRESENTATION_OPTIONS } from "./native/sheet-surface" ;
152+ import { HORIZONTAL_FORM_SHEET_OPTIONS , formSheetDetents } from "./native/sheet-surface" ;
153153import { useThreadOutboxDrain } from "./state/use-thread-outbox-drain" ;
154154import { useComposerAttachmentUploadWorker } from "./state/composer-attachment-uploads" ;
155155
@@ -210,6 +210,15 @@ const LEGAL_DOCUMENT_HEADER_OPTIONS: AppScreenOptions = {
210210
211211const NESTED_NAVIGATOR_OPTIONS = { nativeContentInsetHorizontally : false , headerShown : false } ;
212212
213+ // Thread settings keep the Duo's vertical bar so cancel, search, filter and confirm sit in the
214+ // rail. The picker stack spans the sheet so its header reaches the rail, and insets its content.
215+ const THREAD_SETTINGS_SHEET_OPTIONS = {
216+ presentation : "formSheet" as const ,
217+ sheetAllowedDetents : [ 1 ] ,
218+ sheetGrabberVisible : true ,
219+ nativeContentInsetHorizontally : false ,
220+ } ;
221+
213222const SettingsContentStack = createV5SheetStackNavigator ( {
214223 initialRouteName : "Settings" ,
215224 screenOptions : {
@@ -368,9 +377,7 @@ const SettingsContentStack = createV5SheetStackNavigator({
368377 ...( Platform . OS === "android"
369378 ? { presentation : "card" as const }
370379 : {
371- ...FORM_SHEET_PRESENTATION_OPTIONS ,
372- sheetAllowedDetents : [ 1 ] ,
373- sheetGrabberVisible : true ,
380+ ...THREAD_SETTINGS_SHEET_OPTIONS ,
374381 } ) ,
375382 } ,
376383 } ) ,
@@ -513,9 +520,7 @@ const NewTaskSheetStack = createNativeStackNavigator({
513520 ...( Platform . OS === "android"
514521 ? { presentation : "card" as const }
515522 : {
516- ...FORM_SHEET_PRESENTATION_OPTIONS ,
517- sheetAllowedDetents : [ 1 ] ,
518- sheetGrabberVisible : true ,
523+ ...THREAD_SETTINGS_SHEET_OPTIONS ,
519524 } ) ,
520525 } ,
521526 } ) ,
@@ -734,8 +739,8 @@ const RootStackConfig = createWorkspaceStackNavigator({
734739 screen : PullRequestFilesSheet ,
735740 options : {
736741 ...( Platform . OS === "ios" ? SHEET_GLASS_HEADER_OPTIONS : undefined ) ,
737- ...FORM_SHEET_PRESENTATION_OPTIONS ,
738- sheetAllowedDetents : [ 0.6 , 0.92 ] ,
742+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
743+ sheetAllowedDetents : formSheetDetents ( 0.6 ) ,
739744 sheetGrabberVisible : true ,
740745 sheetCornerRadius : Platform . OS === "android" ? 28 : undefined ,
741746 } ,
@@ -744,8 +749,8 @@ const RootStackConfig = createWorkspaceStackNavigator({
744749 screen : PullRequestReviewersScreen ,
745750 options : {
746751 ...DETAIL_HEADER_OPTIONS ,
747- ...FORM_SHEET_PRESENTATION_OPTIONS ,
748- sheetAllowedDetents : [ 0.75 , 0.92 ] ,
752+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
753+ sheetAllowedDetents : formSheetDetents ( 0.75 ) ,
749754 sheetGrabberVisible : true ,
750755 headerBackVisible : false ,
751756 } ,
@@ -759,17 +764,17 @@ const RootStackConfig = createWorkspaceStackNavigator({
759764 options : {
760765 ...( Platform . OS === "android"
761766 ? { presentation : "fullScreenModal" as const }
762- : { ...SHEET_GLASS_HEADER_OPTIONS , ...FORM_SHEET_PRESENTATION_OPTIONS } ) ,
763- sheetAllowedDetents : Platform . OS === "android" ? undefined : [ 0.75 , 0.92 ] ,
767+ : { ...SHEET_GLASS_HEADER_OPTIONS , ...HORIZONTAL_FORM_SHEET_OPTIONS } ) ,
768+ sheetAllowedDetents : Platform . OS === "android" ? undefined : formSheetDetents ( 0.75 ) ,
764769 sheetGrabberVisible : Platform . OS !== "android" ,
765770 } ,
766771 } ) ,
767772 PullRequestReview : createNativeStackScreen ( {
768773 screen : PullRequestReviewSheet ,
769774 options : {
770775 ...( Platform . OS === "ios" ? SHEET_GLASS_HEADER_OPTIONS : undefined ) ,
771- ...FORM_SHEET_PRESENTATION_OPTIONS ,
772- sheetAllowedDetents : [ 0.75 , 0.92 ] ,
776+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
777+ sheetAllowedDetents : formSheetDetents ( 0.75 ) ,
773778 sheetGrabberVisible : true ,
774779 } ,
775780 } ) ,
@@ -816,8 +821,8 @@ const RootStackConfig = createWorkspaceStackNavigator({
816821 // formSheet; use a full-screen modal there instead.
817822 ...( Platform . OS === "android"
818823 ? { presentation : "fullScreenModal" as const }
819- : FORM_SHEET_PRESENTATION_OPTIONS ) ,
820- sheetAllowedDetents : Platform . OS === "android" ? undefined : [ 0.55 , 0.92 ] ,
824+ : HORIZONTAL_FORM_SHEET_OPTIONS ) ,
825+ sheetAllowedDetents : Platform . OS === "android" ? undefined : formSheetDetents ( 0.55 ) ,
821826 sheetGrabberVisible : Platform . OS !== "android" ,
822827 } ,
823828 } ) ,
@@ -856,54 +861,54 @@ const RootStackConfig = createWorkspaceStackNavigator({
856861 ...( Platform . OS === "android"
857862 ? { presentation : "card" as const }
858863 : {
859- ...FORM_SHEET_PRESENTATION_OPTIONS ,
860- sheetAllowedDetents : [ 1 ] ,
861- sheetGrabberVisible : true ,
864+ ...THREAD_SETTINGS_SHEET_OPTIONS ,
862865 } ) ,
863866 } ,
864867 } ) ,
865868 ThreadQueue : createNativeStackScreen ( {
866869 screen : ThreadQueueSheet ,
867870 options : {
868- ...FORM_SHEET_PRESENTATION_OPTIONS ,
871+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
869872 headerShown : false ,
870- sheetAllowedDetents : [ 0.65 , 0.95 ] ,
873+ sheetAllowedDetents : formSheetDetents ( 0.65 , 0.95 ) ,
871874 sheetGrabberVisible : true ,
872875 } ,
873876 } ) ,
874877 ThreadBackgroundWork : createNativeStackScreen ( {
875878 screen : ThreadBackgroundWorkSheet ,
876879 options : {
877- ...FORM_SHEET_PRESENTATION_OPTIONS ,
880+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
878881 headerShown : false ,
879- sheetAllowedDetents : [ 0.5 , 0.9 ] ,
882+ sheetAllowedDetents : formSheetDetents ( 0.5 , 0.9 ) ,
880883 sheetGrabberVisible : true ,
881884 } ,
882885 } ) ,
883886 ThreadAgents : createNativeStackScreen ( {
884887 screen : ThreadAgentsSheet ,
885888 options : {
886- ...FORM_SHEET_PRESENTATION_OPTIONS ,
889+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
887890 headerShown : false ,
888- sheetAllowedDetents : [ 0.5 , 0.9 ] ,
891+ sheetAllowedDetents : formSheetDetents ( 0.5 , 0.9 ) ,
889892 sheetGrabberVisible : true ,
890893 } ,
891894 } ) ,
892895 GitOverview : createNativeStackScreen ( {
893896 screen : GitOverviewSheet ,
894897 linking : `${ THREAD_LINKING_PREFIX } /git` ,
895898 options : {
896- ...FORM_SHEET_PRESENTATION_OPTIONS ,
897- sheetAllowedDetents : [ 0.55 , 0.92 ] ,
899+ ...( Platform . OS === "ios" ? SHEET_GLASS_HEADER_OPTIONS : undefined ) ,
900+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
901+ sheetAllowedDetents : formSheetDetents ( 0.55 ) ,
898902 sheetGrabberVisible : true ,
899903 } ,
900904 } ) ,
901905 ThreadPullRequests : createNativeStackScreen ( {
902906 screen : ThreadPullRequestsSheet ,
903907 linking : `${ THREAD_LINKING_PREFIX } /pull-requests` ,
904908 options : {
905- ...FORM_SHEET_PRESENTATION_OPTIONS ,
906- sheetAllowedDetents : [ 0.55 , 0.92 ] ,
909+ ...( Platform . OS === "ios" ? SHEET_GLASS_HEADER_OPTIONS : undefined ) ,
910+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
911+ sheetAllowedDetents : formSheetDetents ( 0.55 ) ,
907912 sheetGrabberVisible : true ,
908913 } ,
909914 } ) ,
@@ -912,26 +917,27 @@ const RootStackConfig = createWorkspaceStackNavigator({
912917 linking : `${ THREAD_LINKING_PREFIX } /git/commit` ,
913918 options : {
914919 ...( Platform . OS === "ios" ? SHEET_GLASS_HEADER_OPTIONS : undefined ) ,
915- ...FORM_SHEET_PRESENTATION_OPTIONS ,
916- sheetAllowedDetents : [ 0.8 , 0.92 ] ,
920+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
921+ sheetAllowedDetents : formSheetDetents ( 0.8 ) ,
917922 sheetGrabberVisible : true ,
918923 } ,
919924 } ) ,
920925 GitBranches : createNativeStackScreen ( {
921926 screen : GitBranchesSheet ,
922927 linking : `${ THREAD_LINKING_PREFIX } /git/branches` ,
923928 options : {
924- ...FORM_SHEET_PRESENTATION_OPTIONS ,
925- sheetAllowedDetents : [ 0.55 , 0.92 ] ,
929+ ...( Platform . OS === "ios" ? SHEET_GLASS_HEADER_OPTIONS : undefined ) ,
930+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
931+ sheetAllowedDetents : formSheetDetents ( 0.55 ) ,
926932 sheetGrabberVisible : true ,
927933 } ,
928934 } ) ,
929935 GitConfirm : createNativeStackScreen ( {
930936 screen : GitConfirmSheet ,
931937 linking : `${ THREAD_LINKING_PREFIX } /git-confirm` ,
932938 options : {
933- ...FORM_SHEET_PRESENTATION_OPTIONS ,
934- sheetAllowedDetents : [ 0.45 , 0.7 ] ,
939+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
940+ sheetAllowedDetents : [ 0.55 , 0.7 ] ,
935941 sheetGrabberVisible : true ,
936942 } ,
937943 } ) ,
@@ -964,8 +970,8 @@ const RootStackConfig = createWorkspaceStackNavigator({
964970 ...( Platform . OS === "android" ? { headerShown : false } : SHEET_SOLID_HEADER_OPTIONS ) ,
965971 title : "Set up T3 Connect" ,
966972 gestureEnabled : true ,
967- ...FORM_SHEET_PRESENTATION_OPTIONS ,
968- sheetAllowedDetents : [ 0.6 , 0.95 ] ,
973+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
974+ sheetAllowedDetents : formSheetDetents ( 0.6 , 0.95 ) ,
969975 sheetGrabberVisible : true ,
970976 } ,
971977 } ) ,
@@ -977,7 +983,7 @@ const RootStackConfig = createWorkspaceStackNavigator({
977983 ...( Platform . OS === "android"
978984 ? { presentation : "card" as const , headerShown : false }
979985 : {
980- ...FORM_SHEET_PRESENTATION_OPTIONS ,
986+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
981987 sheetAllowedDetents : [ 0.55 , 0.7 ] ,
982988 sheetGrabberVisible : true ,
983989 } ) ,
@@ -991,7 +997,7 @@ const RootStackConfig = createWorkspaceStackNavigator({
991997 // native header stack mounts without remounting the pairing form.
992998 ...( Platform . OS === "ios" ? SHEET_GLASS_HEADER_OPTIONS : undefined ) ,
993999 title : "Add Environment" ,
994- ...FORM_SHEET_PRESENTATION_OPTIONS ,
1000+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
9951001 sheetAllowedDetents : [ 0.55 , 0.7 ] ,
9961002 sheetGrabberVisible : true ,
9971003 } ,
@@ -1009,6 +1015,7 @@ const RootStackConfig = createWorkspaceStackNavigator({
10091015 ) ,
10101016 options : {
10111017 ...NESTED_NAVIGATOR_OPTIONS ,
1018+ sheetPrefersHorizontalBars : true ,
10121019 gestureEnabled : true ,
10131020 headerShown : false ,
10141021 } ,
@@ -1066,8 +1073,8 @@ export const RootStack = RootStackConfig.with(function AdaptiveRootStack({ Navig
10661073 return usesWorkspaceFlowScreens
10671074 ? { presentation : "card" }
10681075 : {
1069- ... FORM_SHEET_PRESENTATION_OPTIONS ,
1070- sheetAllowedDetents : [ 0.92 ] ,
1076+ presentation : "formSheet" ,
1077+ sheetAllowedDetents : [ 1 ] ,
10711078 sheetGrabberVisible : true ,
10721079 } ;
10731080 } }
0 commit comments