From 5d2cb3b4f5e1cc658d75d292a7d4736022eb16b2 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 22 Feb 2025 11:24:26 +0100 Subject: [PATCH 01/51] feat: add flag to WorkspacePageWithSections component --- src/pages/workspace/WorkspacePageWithSections.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pages/workspace/WorkspacePageWithSections.tsx b/src/pages/workspace/WorkspacePageWithSections.tsx index e6bc5fed299b1..b2ed048301520 100644 --- a/src/pages/workspace/WorkspacePageWithSections.tsx +++ b/src/pages/workspace/WorkspacePageWithSections.tsx @@ -86,6 +86,11 @@ type WorkspacePageWithSectionsProps = WithPolicyAndFullscreenLoadingProps & /** Whether the page is loading, example any other API call in progres */ isLoading?: boolean; + + /** + * If enabled, the content will have a bottom padding equal to account for the safe bottom area inset. + */ + addBottomSafeAreaPaddingToContent?: boolean; }; function fetchData(policyID: string | undefined, skipVBBACal?: boolean) { @@ -122,6 +127,7 @@ function WorkspacePageWithSections({ shouldShowThreeDotsButton, threeDotsMenuItems, threeDotsAnchorPosition, + addBottomSafeAreaPaddingToContent = false, }: WorkspacePageWithSectionsProps) { const styles = useThemeStyles(); const policyID = route.params?.policyID; @@ -168,6 +174,7 @@ function WorkspacePageWithSections({ return ( {content} From 4d4dc8c5651622f3112a29d4dc5a399d3267458c Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 22 Feb 2025 11:25:13 +0100 Subject: [PATCH 02/51] feat: enable edge-to-edge in WorkspaceInitialPage --- src/pages/workspace/WorkspaceInitialPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index 36713c5dce8f3..b487c4b9da818 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -432,6 +432,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac : null} > Date: Sat, 22 Feb 2025 11:25:21 +0100 Subject: [PATCH 03/51] feat: enable edge-to-edge in WorkspaceProfilePage --- src/pages/workspace/WorkspaceProfilePage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/workspace/WorkspaceProfilePage.tsx b/src/pages/workspace/WorkspaceProfilePage.tsx index 0390d7cda4859..6a9e034370d33 100644 --- a/src/pages/workspace/WorkspaceProfilePage.tsx +++ b/src/pages/workspace/WorkspaceProfilePage.tsx @@ -185,6 +185,7 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac icon={Illustrations.Building} shouldShowNotFoundPage={policy === undefined} onBackButtonPress={() => Navigation.goBack(backTo)} + addBottomSafeAreaPaddingToContent > {(hasVBA?: boolean) => ( From 26d803358601c10d2f055ae5685691b3eb46e3e3 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 22 Feb 2025 11:29:17 +0100 Subject: [PATCH 04/51] fix: simplify logical statement --- src/pages/workspace/WorkspaceProfilePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceProfilePage.tsx b/src/pages/workspace/WorkspaceProfilePage.tsx index 6a9e034370d33..87f7e8e3eca0d 100644 --- a/src/pages/workspace/WorkspaceProfilePage.tsx +++ b/src/pages/workspace/WorkspaceProfilePage.tsx @@ -220,7 +220,7 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac styles.sectionMenuItemTopDescription, ]} editIconStyle={styles.smallEditIconWorkspace} - isUsingDefaultAvatar={!policy?.avatarURL ?? false} + isUsingDefaultAvatar={!policy?.avatarURL} onImageSelected={(file) => { if (!policy?.id) { return; From b114b0dbf40fba094094f5d64b2b854dd11ef942 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Sat, 22 Feb 2025 12:39:43 +0100 Subject: [PATCH 05/51] feat: improve `WorkspaceProfileDescriptionPage` --- src/pages/workspace/WorkspaceProfileDescriptionPage.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx index 54ee3c1753efd..367827bcae0fc 100644 --- a/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx +++ b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx @@ -73,6 +73,8 @@ function WorkspaceProfileDescriptionPage({policy}: Props) { Date: Sat, 22 Feb 2025 14:18:48 +0100 Subject: [PATCH 06/51] fix: migrate more screens --- src/pages/workspace/WorkspaceNamePage.tsx | 4 +++- .../workspace/WorkspacePageWithSections.tsx | 11 +++------- .../WorkspaceProfileCurrencyPage.tsx | 3 ++- .../WorkspaceProfileDescriptionPage.tsx | 3 +-- src/pages/workspace/WorkspaceProfilePage.tsx | 2 +- .../WorkspaceProfilePlanTypePage.tsx | 21 ++++++++++--------- 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/src/pages/workspace/WorkspaceNamePage.tsx b/src/pages/workspace/WorkspaceNamePage.tsx index f6e0450d93f2c..b591a1506c648 100644 --- a/src/pages/workspace/WorkspaceNamePage.tsx +++ b/src/pages/workspace/WorkspaceNamePage.tsx @@ -62,7 +62,8 @@ function WorkspaceNamePage({policy}: Props) { accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]} > @@ -79,6 +80,7 @@ function WorkspaceNamePage({policy}: Props) { validate={validate} onSubmit={submit} enabledWhenOffline + shouldSubmitButtonStickToBottom > {content} diff --git a/src/pages/workspace/WorkspaceProfileCurrencyPage.tsx b/src/pages/workspace/WorkspaceProfileCurrencyPage.tsx index 5c0279714cf04..59c80ac31e391 100644 --- a/src/pages/workspace/WorkspaceProfileCurrencyPage.tsx +++ b/src/pages/workspace/WorkspaceProfileCurrencyPage.tsx @@ -43,7 +43,7 @@ function WorkspaceProfileCurrencyPage({policy}: WorkspaceProfileCurrencyPageProp fullPageNotFoundViewProps={{onLinkPress: goBackFromInvalidPolicy, subtitleKey: isEmptyObject(policy) ? undefined : 'workspace.common.notAuthorized'}} > diff --git a/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx index 367827bcae0fc..a170cecc28694 100644 --- a/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx +++ b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx @@ -71,7 +71,6 @@ function WorkspaceProfileDescriptionPage({policy}: Props) { accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]} > diff --git a/src/pages/workspace/WorkspaceProfilePage.tsx b/src/pages/workspace/WorkspaceProfilePage.tsx index 87f7e8e3eca0d..191cf85b117b7 100644 --- a/src/pages/workspace/WorkspaceProfilePage.tsx +++ b/src/pages/workspace/WorkspaceProfilePage.tsx @@ -185,7 +185,7 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac icon={Illustrations.Building} shouldShowNotFoundPage={policy === undefined} onBackButtonPress={() => Navigation.goBack(backTo)} - addBottomSafeAreaPaddingToContent + addBottomSafeAreaPadding > {(hasVBA?: boolean) => ( diff --git a/src/pages/workspace/WorkspaceProfilePlanTypePage.tsx b/src/pages/workspace/WorkspaceProfilePlanTypePage.tsx index d05fcabd63382..7cdd721c3f1d2 100644 --- a/src/pages/workspace/WorkspaceProfilePlanTypePage.tsx +++ b/src/pages/workspace/WorkspaceProfilePlanTypePage.tsx @@ -4,7 +4,6 @@ import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; import Button from '@components/Button'; -import FixedFooter from '@components/FixedFooter'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import Icon from '@components/Icon'; @@ -104,6 +103,7 @@ function WorkspaceProfilePlanTypePage({policy}: WithPolicyProps) { {policy?.isLoading ? ( @@ -140,16 +140,17 @@ function WorkspaceProfilePlanTypePage({policy}: WithPolicyProps) { shouldUpdateFocusedIndex shouldSingleExecuteRowSelect initiallyFocusedOptionKey={workspacePlanTypes.find((mode) => mode.isSelected)?.keyForList} + addBottomSafeAreaPadding + footerContent={ +