From 868b3052e930ae19f9bd7ccac7f85ca07ff98353 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Mon, 28 Oct 2024 14:50:48 +0100 Subject: [PATCH 1/2] Fix issue: BA - Back button on connect bank account modal opens incorporation state modal --- src/components/StateSelector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/StateSelector.tsx b/src/components/StateSelector.tsx index e2be9281d0bb..5248af98cfac 100644 --- a/src/components/StateSelector.tsx +++ b/src/components/StateSelector.tsx @@ -91,7 +91,7 @@ function StateSelector( onPress={() => { const activeRoute = Navigation.getActiveRoute(); didOpenStateSelector.current = true; - Navigation.navigate(stateSelectorRoute.getRoute(stateCode, activeRoute, label)); + Navigation.goUp(stateSelectorRoute.getRoute(stateCode, activeRoute, label), {compareParams: false}); }} wrapperStyle={wrapperStyle} /> From 92e47ac39c88488cf4d0c0f01d0466f110478bb3 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Tue, 29 Oct 2024 15:16:10 +0100 Subject: [PATCH 2/2] Fix issue: Android - Offline indicator is below the app navigation bar --- src/components/ScreenWrapper.tsx | 5 +++++ src/pages/Search/SearchPageBottomTab.tsx | 2 +- src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx | 2 +- src/pages/settings/InitialSettingsPage.tsx | 2 +- src/pages/workspace/WorkspaceInitialPage.tsx | 2 +- src/pages/workspace/WorkspacesListPage.tsx | 4 ++-- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/ScreenWrapper.tsx b/src/components/ScreenWrapper.tsx index 152a14fc3eb7..90641e97221f 100644 --- a/src/components/ScreenWrapper.tsx +++ b/src/components/ScreenWrapper.tsx @@ -41,6 +41,9 @@ type ScreenWrapperProps = { /** Returns a function as a child to pass insets to or a node to render without insets */ children: ReactNode | React.FC; + /** Content to display under the offline indicator */ + bottomContent?: ReactNode; + /** A unique ID to find the screen wrapper in tests */ testID: string; @@ -132,6 +135,7 @@ function ScreenWrapper( shouldShowOfflineIndicatorInWideScreen = false, shouldUseCachedViewportHeight = false, focusTrapSettings, + bottomContent, }: ScreenWrapperProps, ref: ForwardedRef, ) { @@ -306,6 +310,7 @@ function ScreenWrapper( )} + {bottomContent} diff --git a/src/pages/Search/SearchPageBottomTab.tsx b/src/pages/Search/SearchPageBottomTab.tsx index ee73a1b5f8aa..e0f1124a39d1 100644 --- a/src/pages/Search/SearchPageBottomTab.tsx +++ b/src/pages/Search/SearchPageBottomTab.tsx @@ -89,6 +89,7 @@ function SearchPageBottomTab({queryJSON, policyID, searchName}: SearchPageBottom } > {!selectionMode?.isEnabled ? ( <> @@ -121,7 +122,6 @@ function SearchPageBottomTab({queryJSON, policyID, searchName}: SearchPageBottom onSearchListScroll={scrollHandler} contentContainerStyle={!selectionMode?.isEnabled ? [styles.searchListContentContainerStyles] : undefined} /> - ); } diff --git a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx index 0dbd5b418c34..6a97c3a66612 100644 --- a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx +++ b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx @@ -50,6 +50,7 @@ function BaseSidebarScreen() { shouldEnableKeyboardAvoidingView={false} style={[styles.sidebar, Browser.isMobile() ? styles.userSelectNone : {}]} testID={BaseSidebarScreen.displayName} + bottomContent={} > {({insets}) => ( <> @@ -64,7 +65,6 @@ function BaseSidebarScreen() { insets={insets} /> - )} diff --git a/src/pages/settings/InitialSettingsPage.tsx b/src/pages/settings/InitialSettingsPage.tsx index 71603aed283f..a6f1660a2271 100755 --- a/src/pages/settings/InitialSettingsPage.tsx +++ b/src/pages/settings/InitialSettingsPage.tsx @@ -408,6 +408,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr } > {headerContent} toggleSignoutConfirmModal(false)} /> - ); } diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index 2aaa7941b5e8..7792d0412d8a 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -367,6 +367,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac } > - ); diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 388b75e5286e..e47436ab5a8a 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -378,6 +378,7 @@ function WorkspacesListPage() { shouldEnableMaxHeight testID={WorkspacesListPage.displayName} shouldShowOfflineIndicatorInWideScreen + bottomContent={shouldUseNarrowLayout && } > - {shouldUseNarrowLayout && } ); } @@ -415,6 +415,7 @@ function WorkspacesListPage() { shouldEnablePickerAvoiding={false} shouldShowOfflineIndicatorInWideScreen testID={WorkspacesListPage.displayName} + bottomContent={shouldUseNarrowLayout && } > - {shouldUseNarrowLayout && } ); }