From 91cf7bb74c76a1eb7cfcf848a792430fd88356a0 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Wed, 18 Dec 2024 11:35:35 +0100 Subject: [PATCH 01/18] fix: apply safe area padding for workspace screens --- src/pages/workspace/WorkspaceInitialPage.tsx | 5 +---- src/pages/workspace/WorkspaceMoreFeaturesPage.tsx | 1 - src/pages/workspace/rules/PolicyRulesPage.tsx | 1 + src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx | 1 + 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index 95449e4c10ea3..bb2be6053c3d8 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -390,10 +390,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac }, [policy]); return ( - + diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index f4d05a09fba6f..5503ab7a24428 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -341,6 +341,7 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) { isLoading={isLoading} shouldShowLoading={isLoading} shouldUseScrollView + includeSafeAreaPaddingBottom > {optionItems.map(renderOptionItem)} From a8b835ec514890b939dab938bc286945e173983d Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Thu, 19 Dec 2024 13:25:13 +0100 Subject: [PATCH 02/18] fix: partially resolve new eslint findings --- src/libs/PolicyUtils.ts | 6 +++++- src/libs/ReportUtils.ts | 6 +++++- src/pages/workspace/WorkspaceInitialPage.tsx | 8 ++++---- src/pages/workspace/WorkspaceMoreFeaturesPage.tsx | 6 +++--- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 9bf68b2c5432e..3f06532df87d4 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -1072,7 +1072,11 @@ function getCurrentTaxID(policy: OnyxEntry, taxID: string): string | und return Object.keys(policy?.taxRates?.taxes ?? {}).find((taxIDKey) => policy?.taxRates?.taxes?.[taxIDKey].previousTaxCode === taxID || taxIDKey === taxID); } -function getWorkspaceAccountID(policyID: string) { +function getWorkspaceAccountID(policyID?: string) { + if (!policyID) { + return 0; + } + const policy = getPolicy(policyID); if (!policy) { diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index d2ec8fb3ac624..b5061b1a00cbf 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -6757,7 +6757,11 @@ function getInvoiceChatByParticipants(policyID: string, receiverID: string | num /** * Attempts to find a policy expense report in onyx that is owned by ownerAccountID in a given policy */ -function getPolicyExpenseChat(ownerAccountID: number, policyID: string): OnyxEntry { +function getPolicyExpenseChat(ownerAccountID: number, policyID?: string): OnyxEntry { + if (!policyID) { + return undefined; + } + return Object.values(allReports ?? {}).find((report: OnyxEntry) => { // If the report has been deleted, then skip it if (!report) { diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index bb2be6053c3d8..a20583838170d 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -86,7 +86,7 @@ function dismissError(policyID: string, pendingAction: PendingAction | undefined function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: WorkspaceInitialPageProps) { const styles = useThemeStyles(); const policy = policyDraft?.id ? policyDraft : policyProp; - const workspaceAccountID = PolicyUtils.getWorkspaceAccountID(policy?.id ?? '-1'); + const workspaceAccountID = PolicyUtils.getWorkspaceAccountID(policy?.id); const [isCurrencyModalOpen, setIsCurrencyModalOpen] = useState(false); const hasPolicyCreationError = !!(policy?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD && !isEmptyObject(policy.errors)); const [cardFeeds] = useOnyx(`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${workspaceAccountID}`); @@ -94,7 +94,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac const [cardsList] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${workspaceAccountID}_${CONST.EXPENSIFY_CARD.BANK}`); const [connectionSyncProgress] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CONNECTION_SYNC_PROGRESS}${policy?.id}`); const [currentUserLogin] = useOnyx(ONYXKEYS.SESSION, {selector: (session) => session?.email}); - const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${route.params?.policyID ?? '-1'}`); + const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${route.params?.policyID}`); const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); const {login, accountID} = useCurrentUserPersonalDetails(); const hasSyncError = PolicyUtils.shouldShowSyncError(policy, isConnectionInProgress(connectionSyncProgress, policy)); @@ -104,7 +104,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac const {translate} = useLocalize(); const {isOffline} = useNetwork(); const wasRendered = useRef(false); - const currentUserPolicyExpenseChatReportID = getPolicyExpenseChat(accountID, policy?.id ?? '-1')?.reportID ?? '-1'; + const currentUserPolicyExpenseChatReportID = getPolicyExpenseChat(accountID, policy?.id)?.reportID; const [currentUserPolicyExpenseChat] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${currentUserPolicyExpenseChatReportID}`); const {reportPendingAction} = getReportOfflinePendingActionAndErrors(currentUserPolicyExpenseChat); const isPolicyExpenseChatEnabled = !!policy?.isPolicyExpenseChatEnabled; @@ -385,7 +385,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac source: avatar, name: policy?.name ?? '', type: CONST.ICON_TYPE_WORKSPACE, - id: policy.id ?? '-1', + id: policy.id, }; }, [policy]); diff --git a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx index 53ab43832d0dc..3dc7ffa8a065f 100644 --- a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx +++ b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx @@ -74,9 +74,9 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro !!policy?.connections?.xero?.config?.importTaxRates || !!policy?.connections?.netsuite?.options?.config?.syncOptions?.syncTax; const policyID = policy?.id; - const workspaceAccountID = policy?.workspaceAccountID ?? -1; - const [cardsList] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${workspaceAccountID.toString()}_${CONST.EXPENSIFY_CARD.BANK}`); - const [cardFeeds] = useOnyx(`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${workspaceAccountID.toString()}`); + const workspaceAccountID = policy?.workspaceAccountID; + const [cardsList] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${workspaceAccountID}_${CONST.EXPENSIFY_CARD.BANK}`); + const [cardFeeds] = useOnyx(`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${workspaceAccountID}`); const [isOrganizeWarningModalOpen, setIsOrganizeWarningModalOpen] = useState(false); const [isIntegrateWarningModalOpen, setIsIntegrateWarningModalOpen] = useState(false); const [isReportFieldsWarningModalOpen, setIsReportFieldsWarningModalOpen] = useState(false); From d766f3d3f234e0daa4cd705eb05a52fc150b0aea Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Thu, 19 Dec 2024 15:14:40 +0100 Subject: [PATCH 03/18] fix: two more lint violations --- src/libs/actions/Policy/Policy.ts | 5 ++++- src/pages/workspace/WorkspaceInitialPage.tsx | 7 ++++++- src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index f81539d1e9215..0b66c6ba8e8a2 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -623,7 +623,10 @@ function setWorkspacePayer(policyID: string, reimburserEmail: string) { API.write(WRITE_COMMANDS.SET_WORKSPACE_PAYER, params, {optimisticData, failureData, successData}); } -function clearPolicyErrorField(policyID: string, fieldName: string) { +function clearPolicyErrorField(policyID?: string, fieldName?: string) { + if (!policyID || !fieldName) { + return; + } Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {errorFields: {[fieldName]: null}}); } diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index a20583838170d..8fce856c2b9bc 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -451,7 +451,12 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac title={getReportName(currentUserPolicyExpenseChat)} description={translate('workspace.common.workspace')} icon={getIcons(currentUserPolicyExpenseChat, personalDetails)} - onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(currentUserPolicyExpenseChat?.reportID ?? '-1'), CONST.NAVIGATION.TYPE.UP)} + onPress={() => { + if (!currentUserPolicyExpenseChat?.reportID) { + return; + } + Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(currentUserPolicyExpenseChat?.reportID), CONST.NAVIGATION.TYPE.UP) + }} shouldShowRightIcon wrapperStyle={[styles.br2, styles.pl2, styles.pr0, styles.pv3, styles.mt1, styles.alignItemsCenter]} shouldShowSubscriptAvatar diff --git a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx index 5503ab7a24428..a9186d19d64a5 100644 --- a/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx +++ b/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx @@ -260,7 +260,7 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) { pendingAction={policy?.pendingFields?.reimburser} shouldDisableOpacity={isOffline && !!policy?.pendingFields?.reimbursementChoice && !!policy?.pendingFields?.reimburser} errors={ErrorUtils.getLatestErrorField(policy ?? {}, CONST.POLICY.COLLECTION_KEYS.REIMBURSER)} - onClose={() => Policy.clearPolicyErrorField(policy?.id ?? '', CONST.POLICY.COLLECTION_KEYS.REIMBURSER)} + onClose={() => Policy.clearPolicyErrorField(policy?.id, CONST.POLICY.COLLECTION_KEYS.REIMBURSER)} errorRowStyles={[styles.ml7]} > Date: Thu, 19 Dec 2024 15:32:15 +0100 Subject: [PATCH 04/18] fix: eslint --- src/pages/workspace/WorkspaceInitialPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index 8fce856c2b9bc..b4fed1bf065ca 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -455,7 +455,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac if (!currentUserPolicyExpenseChat?.reportID) { return; } - Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(currentUserPolicyExpenseChat?.reportID), CONST.NAVIGATION.TYPE.UP) + Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(currentUserPolicyExpenseChat?.reportID), CONST.NAVIGATION.TYPE.UP); }} shouldShowRightIcon wrapperStyle={[styles.br2, styles.pl2, styles.pr0, styles.pv3, styles.mt1, styles.alignItemsCenter]} From 366f4f91d3b943aad603f603e0bbdb9c7aeefb37 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 20 Dec 2024 11:18:42 +0100 Subject: [PATCH 05/18] fix: changes after review --- src/libs/PolicyUtils.ts | 8 ++++---- src/libs/ReportUtils.ts | 2 +- src/libs/actions/Policy/Policy.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 3f06532df87d4..ccc900fa9fa40 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -1072,17 +1072,17 @@ function getCurrentTaxID(policy: OnyxEntry, taxID: string): string | und return Object.keys(policy?.taxRates?.taxes ?? {}).find((taxIDKey) => policy?.taxRates?.taxes?.[taxIDKey].previousTaxCode === taxID || taxIDKey === taxID); } -function getWorkspaceAccountID(policyID?: string) { +function getWorkspaceAccountID(policyID: string | undefined) { if (!policyID) { - return 0; + return CONST.DEFAULT_NUMBER_ID; } const policy = getPolicy(policyID); if (!policy) { - return 0; + return CONST.DEFAULT_NUMBER_ID; } - return policy.workspaceAccountID ?? 0; + return policy.workspaceAccountID ?? CONST.DEFAULT_NUMBER_ID; } function hasVBBA(policyID: string) { diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index b5061b1a00cbf..5fd9bffd6d329 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -6757,7 +6757,7 @@ function getInvoiceChatByParticipants(policyID: string, receiverID: string | num /** * Attempts to find a policy expense report in onyx that is owned by ownerAccountID in a given policy */ -function getPolicyExpenseChat(ownerAccountID: number, policyID?: string): OnyxEntry { +function getPolicyExpenseChat(ownerAccountID: number, policyID: string | undefined): OnyxEntry { if (!policyID) { return undefined; } diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index 0b66c6ba8e8a2..ba9b8ed6c9873 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -623,7 +623,7 @@ function setWorkspacePayer(policyID: string, reimburserEmail: string) { API.write(WRITE_COMMANDS.SET_WORKSPACE_PAYER, params, {optimisticData, failureData, successData}); } -function clearPolicyErrorField(policyID?: string, fieldName?: string) { +function clearPolicyErrorField(policyID: string | undefined, fieldName: string | undefined) { if (!policyID || !fieldName) { return; } From d27e0bce0cfe15b471254c48e2ed12d0d7beea49 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 22 Jan 2025 16:05:28 +0100 Subject: [PATCH 06/18] fix: add bottom safe area padding for more screens --- src/pages/settings/Preferences/PreferencesPage.tsx | 1 - src/pages/settings/Profile/ProfilePage.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/src/pages/settings/Preferences/PreferencesPage.tsx b/src/pages/settings/Preferences/PreferencesPage.tsx index 48cb8c99cf21e..6ddd8c6b6871c 100755 --- a/src/pages/settings/Preferences/PreferencesPage.tsx +++ b/src/pages/settings/Preferences/PreferencesPage.tsx @@ -36,7 +36,6 @@ function PreferencesPage() { return ( From 2144b059c3bdac9be407d4ef306d5c9dbb2b3d20 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 22 Jan 2025 17:20:43 +0100 Subject: [PATCH 07/18] refactor: remove `includeSafeAreaPaddingBottom={false}` --- src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx | 1 - src/components/AmountPicker/AmountSelectorModal.tsx | 1 - src/components/AvatarCropModal/AvatarCropModal.tsx | 1 - src/components/CountryPicker/CountrySelectorModal.tsx | 1 - src/components/CurrencyPicker.tsx | 1 - src/components/HeaderPageLayout.tsx | 1 - src/components/ImportSpreadsheet.tsx | 1 - src/components/PushRowWithModal/PushRowModal.tsx | 1 - src/components/StatePicker/StateSelectorModal.tsx | 1 - src/pages/Debug/Report/DebugReportPage.tsx | 1 - src/pages/Debug/ReportAction/DebugReportActionCreatePage.tsx | 1 - src/pages/Debug/ReportAction/DebugReportActionPage.tsx | 1 - src/pages/Debug/Transaction/DebugTransactionPage.tsx | 1 - .../DebugTransactionViolationCreatePage.tsx | 1 - .../TransactionViolation/DebugTransactionViolationPage.tsx | 1 - src/pages/EditReportFieldPage.tsx | 1 - src/pages/EnablePayments/AddBankAccount/AddBankAccount.tsx | 1 - src/pages/EnablePayments/EnablePayments.tsx | 2 -- src/pages/FlagCommentPage.tsx | 5 +---- src/pages/KeyboardShortcutsPage.tsx | 5 +---- .../MissingPersonalDetails/MissingPersonalDetailsContent.tsx | 1 - src/pages/NewChatSelectorPage.tsx | 1 - src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx | 1 - src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx | 1 - .../OnboardingPrivateDomain/BaseOnboardingPrivateDomain.tsx | 1 - src/pages/OnboardingWorkspaces/BaseOnboardingWorkspaces.tsx | 1 - src/pages/PrivateNotes/PrivateNotesListPage.tsx | 5 +---- src/pages/ReimbursementAccount/BankAccountStep.tsx | 5 +---- .../BusinessTypePicker/BusinessTypeSelectorModal.tsx | 1 - .../ConnectBankAccount/ConnectBankAccount.tsx | 1 - src/pages/ReimbursementAccount/ContinueBankAccountSetup.tsx | 5 +---- .../EnableBankAccount/EnableBankAccount.tsx | 1 - src/pages/ReimbursementAccount/NonUSD/Finish/index.tsx | 1 - src/pages/ReimbursementAccount/RequestorOnfidoStep.tsx | 1 - src/pages/ReportParticipantsPage.tsx | 1 - src/pages/RoomMembersPage.tsx | 1 - .../SearchFiltersExpenseTypePage.tsx | 1 - src/pages/TeachersUnite/SaveTheWorldPage.tsx | 1 - src/pages/Travel/MyTripsPage.tsx | 1 - src/pages/Travel/TravelTerms.tsx | 1 - src/pages/Travel/TripSummaryPage.tsx | 1 - src/pages/home/sidebar/AllSettingsScreen.tsx | 1 - src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.tsx | 1 - src/pages/iou/request/step/StepScreenDragAndDropWrapper.tsx | 1 - .../settings/AboutPage/ShareLogList/BaseShareLogList.tsx | 5 +---- src/pages/settings/InitialSettingsPage.tsx | 1 - src/pages/settings/Preferences/LanguagePage.tsx | 5 +---- src/pages/settings/Preferences/PriorityModePage.tsx | 5 +---- src/pages/settings/Preferences/ThemePage.tsx | 5 +---- .../Profile/PersonalDetails/CountrySelectionPage.tsx | 5 +---- .../settings/Profile/PersonalDetails/StateSelectionPage.tsx | 5 +---- src/pages/settings/Profile/PronounsPage.tsx | 5 +---- src/pages/settings/Profile/TimezoneSelectPage.tsx | 5 +---- src/pages/settings/Report/NotificationPreferencePage.tsx | 5 +---- src/pages/settings/Report/VisibilityPage.tsx | 5 +---- src/pages/settings/Report/WriteCapabilityPage.tsx | 5 +---- src/pages/settings/Security/AddDelegate/AddDelegatePage.tsx | 5 +---- .../settings/Security/AddDelegate/SelectDelegateRolePage.tsx | 5 +---- .../UpdateDelegateRole/UpdateDelegateMagicCodePage.tsx | 1 - .../UpdateDelegateRole/UpdateDelegateRolePage.tsx | 5 +---- src/pages/settings/Security/SecuritySettingsPage.tsx | 1 - .../settings/Security/TwoFactorAuth/TwoFactorAuthPage.tsx | 1 - .../settings/Subscription/CardAuthenticationModal/index.tsx | 1 - .../Subscription/DisableAutoRenewSurveyPage/index.tsx | 1 - .../Subscription/RequestEarlyCancellationPage/index.tsx | 1 - src/pages/settings/Subscription/SubscriptionSize/index.tsx | 1 - src/pages/settings/Wallet/AddDebitCardPage.tsx | 1 - src/pages/signin/SAMLSignInPage/index.native.tsx | 1 - src/pages/signin/SignInModal.tsx | 1 - src/pages/tasks/TaskAssigneeSelectorModal.tsx | 5 +---- src/pages/tasks/TaskShareDestinationSelectorModal.tsx | 1 - src/pages/wallet/WalletStatementPage.tsx | 1 - src/pages/workspace/WorkspaceInviteMessagePage.tsx | 1 - src/pages/workspace/WorkspaceProfileCurrencyPage.tsx | 5 +---- src/pages/workspace/WorkspacesListPage.tsx | 1 - src/pages/workspace/accounting/PolicyAccountingPage.tsx | 1 - .../accounting/netsuite/advanced/NetSuiteAutoSyncPage.tsx | 1 - .../NetSuiteCustomListSelectorModal.tsx | 1 - .../accounting/reconciliation/CardReconciliationPage.tsx | 1 - src/pages/workspace/categories/CategoryApproverPage.tsx | 1 - .../workspace/categories/CategoryDefaultTaxRatePage.tsx | 1 - .../workspace/categories/CategoryRequireReceiptsOverPage.tsx | 1 - src/pages/workspace/categories/CategorySettingsPage.tsx | 1 - .../ExpenseLimitTypeSelectorModal.tsx | 1 - src/pages/workspace/categories/WorkspaceCategoriesPage.tsx | 1 - .../workspace/categories/WorkspaceCategoriesSettingsPage.tsx | 1 - .../companyCards/WorkspaceCompanyCardDetailsPage.tsx | 5 +---- src/pages/workspace/companyCards/addNew/AddNewCardPage.tsx | 1 - src/pages/workspace/companyCards/addNew/AmexCustomFeed.tsx | 1 - .../companyCards/addNew/BankConnection/index.native.tsx | 1 - src/pages/workspace/companyCards/addNew/CardTypeStep.tsx | 1 - src/pages/workspace/companyCards/addNew/SelectBankStep.tsx | 1 - src/pages/workspace/companyCards/addNew/SelectFeedType.tsx | 1 - .../workspace/companyCards/assignCard/AssignCardFeedPage.tsx | 1 - .../companyCards/assignCard/BankConnection/index.native.tsx | 1 - .../workspace/companyCards/assignCard/CardSelectionStep.tsx | 1 - .../assignCard/TransactionStartDateSelectorModal.tsx | 1 - .../distanceRates/PolicyDistanceRateDetailsPage.tsx | 1 - .../distanceRates/PolicyDistanceRateTaxRateEditPage.tsx | 1 - .../workspace/distanceRates/PolicyDistanceRatesPage.tsx | 1 - .../distanceRates/PolicyDistanceRatesSettingsPage.tsx | 1 - .../distanceRates/UnitSelector/UnitSelectorModal.tsx | 1 - .../workspace/expensifyCard/WorkspaceCardSettingsPage.tsx | 1 - .../expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx | 1 - .../expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx | 5 +---- .../expensifyCard/WorkspaceSettlementAccountPage.tsx | 1 - .../expensifyCard/WorkspaceSettlementFrequencyPage.tsx | 1 - .../workspace/expensifyCard/issueNew/IssueNewCardPage.tsx | 1 - src/pages/workspace/perDiem/WorkspacePerDiemDetailsPage.tsx | 1 - src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx | 1 - src/pages/workspace/perDiem/WorkspacePerDiemSettingsPage.tsx | 1 - .../InitialListValueSelectorModal.tsx | 1 - .../workspace/reportFields/ReportFieldsListValuesPage.tsx | 1 - .../workspace/reportFields/ReportFieldsSettingsPage.tsx | 1 - .../workspace/reportFields/ReportFieldsValueSettingsPage.tsx | 1 - .../reportFields/TypeSelector/TypeSelectorModal.tsx | 1 - .../workspace/reportFields/WorkspaceReportFieldsPage.tsx | 1 - src/pages/workspace/rules/RulesBillableDefaultPage.tsx | 1 - src/pages/workspace/tags/TagApproverPage.tsx | 1 - src/pages/workspace/tags/TagSettingsPage.tsx | 1 - src/pages/workspace/tags/WorkspaceTagsPage.tsx | 1 - src/pages/workspace/tags/WorkspaceTagsSettingsPage.tsx | 1 - src/pages/workspace/tags/WorkspaceViewTagsPage.tsx | 1 - src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx | 1 - src/pages/workspace/taxes/WorkspaceTaxesPage.tsx | 1 - .../taxes/WorkspaceTaxesSettingsForeignCurrency.tsx | 1 - .../taxes/WorkspaceTaxesSettingsWorkspaceCurrency.tsx | 1 - .../workflows/WorkspaceAutoReportingFrequencyPage.tsx | 5 +---- .../workflows/WorkspaceAutoReportingMonthlyOffsetPage.tsx | 5 +---- .../workspace/workflows/WorkspaceWorkflowsPayerPage.tsx | 5 +---- 130 files changed, 26 insertions(+), 209 deletions(-) diff --git a/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx b/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx index f7c3ca4e2b5e4..9231737ed9bc7 100644 --- a/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx +++ b/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx @@ -62,7 +62,6 @@ function PaymentCardCurrencyModal({isVisible, currencies, currentCurrency = CONS {shouldUseNarrowLayout && } diff --git a/src/components/CountryPicker/CountrySelectorModal.tsx b/src/components/CountryPicker/CountrySelectorModal.tsx index 2daa74dcb4e88..47a1042a771c4 100644 --- a/src/components/CountryPicker/CountrySelectorModal.tsx +++ b/src/components/CountryPicker/CountrySelectorModal.tsx @@ -70,7 +70,6 @@ function CountrySelectorModal({isVisible, currentCountry, onCountrySelected, onC diff --git a/src/pages/EnablePayments/AddBankAccount/AddBankAccount.tsx b/src/pages/EnablePayments/AddBankAccount/AddBankAccount.tsx index 55f19f8c35b9f..7ec3706a18fac 100644 --- a/src/pages/EnablePayments/AddBankAccount/AddBankAccount.tsx +++ b/src/pages/EnablePayments/AddBankAccount/AddBankAccount.tsx @@ -72,7 +72,6 @@ function AddBankAccount() { return ( diff --git a/src/pages/EnablePayments/EnablePayments.tsx b/src/pages/EnablePayments/EnablePayments.tsx index b55141fec2995..86c7486b14bc4 100644 --- a/src/pages/EnablePayments/EnablePayments.tsx +++ b/src/pages/EnablePayments/EnablePayments.tsx @@ -39,7 +39,6 @@ function EnablePaymentsPage() { return ( @@ -55,7 +54,6 @@ function EnablePaymentsPage() { return ( + {({safeAreaPaddingBottomStyle}) => ( + diff --git a/src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx b/src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx index e09c58b54d5eb..7e8085960d2ec 100644 --- a/src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx +++ b/src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx @@ -109,7 +109,6 @@ function MissingPersonalDetailsContent({privatePersonalDetails, draftValues}: Mi return ( diff --git a/src/pages/NewChatSelectorPage.tsx b/src/pages/NewChatSelectorPage.tsx index 9e167c2d51a77..fd26c19a70910 100755 --- a/src/pages/NewChatSelectorPage.tsx +++ b/src/pages/NewChatSelectorPage.tsx @@ -32,7 +32,6 @@ function NewChatSelectorPage() { return ( diff --git a/src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx b/src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx index 12722e87f05a0..778dcb58abcd2 100644 --- a/src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx +++ b/src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx @@ -114,7 +114,6 @@ function BaseOnboardingEmployees({shouldUseNativeStyles, route}: BaseOnboardingE return ( diff --git a/src/pages/OnboardingPrivateDomain/BaseOnboardingPrivateDomain.tsx b/src/pages/OnboardingPrivateDomain/BaseOnboardingPrivateDomain.tsx index 50d8b7f7ce2e2..d6bad730d7462 100644 --- a/src/pages/OnboardingPrivateDomain/BaseOnboardingPrivateDomain.tsx +++ b/src/pages/OnboardingPrivateDomain/BaseOnboardingPrivateDomain.tsx @@ -57,7 +57,6 @@ function BaseOnboardingPrivateDomain({shouldUseNativeStyles, route}: BaseOnboard return ( diff --git a/src/pages/OnboardingWorkspaces/BaseOnboardingWorkspaces.tsx b/src/pages/OnboardingWorkspaces/BaseOnboardingWorkspaces.tsx index c6d332f075ed2..1e19ec13aa044 100644 --- a/src/pages/OnboardingWorkspaces/BaseOnboardingWorkspaces.tsx +++ b/src/pages/OnboardingWorkspaces/BaseOnboardingWorkspaces.tsx @@ -113,7 +113,6 @@ function BaseOnboardingWorkspaces({shouldUseNativeStyles, route}: BaseOnboarding return ( diff --git a/src/pages/PrivateNotes/PrivateNotesListPage.tsx b/src/pages/PrivateNotes/PrivateNotesListPage.tsx index d2cdda140bb8b..36c94ed439fb2 100644 --- a/src/pages/PrivateNotes/PrivateNotesListPage.tsx +++ b/src/pages/PrivateNotes/PrivateNotesListPage.tsx @@ -87,10 +87,7 @@ function PrivateNotesListPage({report, accountID: sessionAccountID}: PrivateNote }, [report, personalDetailsList, sessionAccountID, translate, backTo]); return ( - + + diff --git a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.tsx b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.tsx index 9e1897348dabe..ddafb35cc9e56 100644 --- a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.tsx +++ b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.tsx @@ -39,10 +39,7 @@ function ContinueBankAccountSetup({policyName = '', onBackButtonPress, reimburse const pendingAction = reimbursementAccount?.pendingAction ?? null; return ( - + diff --git a/src/pages/ReimbursementAccount/RequestorOnfidoStep.tsx b/src/pages/ReimbursementAccount/RequestorOnfidoStep.tsx index 26197abd5f6cf..97e5e70ce3e02 100644 --- a/src/pages/ReimbursementAccount/RequestorOnfidoStep.tsx +++ b/src/pages/ReimbursementAccount/RequestorOnfidoStep.tsx @@ -60,7 +60,6 @@ function RequestorOnfidoStep({onBackButtonPress, reimbursementAccount, onfidoTok return ( diff --git a/src/pages/ReportParticipantsPage.tsx b/src/pages/ReportParticipantsPage.tsx index 1bb36bf89080c..b2490529eccf8 100755 --- a/src/pages/ReportParticipantsPage.tsx +++ b/src/pages/ReportParticipantsPage.tsx @@ -361,7 +361,6 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) { return ( diff --git a/src/pages/RoomMembersPage.tsx b/src/pages/RoomMembersPage.tsx index a14ada3d3f003..4218d3ce2f009 100644 --- a/src/pages/RoomMembersPage.tsx +++ b/src/pages/RoomMembersPage.tsx @@ -353,7 +353,6 @@ function RoomMembersPage({report, policies}: RoomMembersPageProps) { return ( diff --git a/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersExpenseTypePage.tsx b/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersExpenseTypePage.tsx index f0e90912302dd..57ae26d6fa8f9 100644 --- a/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersExpenseTypePage.tsx +++ b/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersExpenseTypePage.tsx @@ -45,7 +45,6 @@ function SearchFiltersExpenseTypePage() { testID={SearchFiltersExpenseTypePage.displayName} shouldShowOfflineIndicatorInWideScreen offlineIndicatorStyle={styles.mtAuto} - includeSafeAreaPaddingBottom={false} shouldEnableMaxHeight > diff --git a/src/pages/Travel/MyTripsPage.tsx b/src/pages/Travel/MyTripsPage.tsx index 58db57685ab70..ebac98dd9fed0 100644 --- a/src/pages/Travel/MyTripsPage.tsx +++ b/src/pages/Travel/MyTripsPage.tsx @@ -13,7 +13,6 @@ function MyTripsPage() { return ( diff --git a/src/pages/Travel/TripSummaryPage.tsx b/src/pages/Travel/TripSummaryPage.tsx index 69926f0e443e9..95c399eb3d164 100644 --- a/src/pages/Travel/TripSummaryPage.tsx +++ b/src/pages/Travel/TripSummaryPage.tsx @@ -26,7 +26,6 @@ function TripSummaryPage({route}: TripSummaryPageProps) { return ( + {({didScreenTransitionEnd}) => ( <> diff --git a/src/pages/settings/Preferences/LanguagePage.tsx b/src/pages/settings/Preferences/LanguagePage.tsx index 0b23210b8ff14..25ac51b16c0bc 100644 --- a/src/pages/settings/Preferences/LanguagePage.tsx +++ b/src/pages/settings/Preferences/LanguagePage.tsx @@ -34,10 +34,7 @@ function LanguagePage() { }; return ( - + Navigation.goBack()} diff --git a/src/pages/settings/Preferences/PriorityModePage.tsx b/src/pages/settings/Preferences/PriorityModePage.tsx index 57f565e7dca73..3ee5acf890e7c 100644 --- a/src/pages/settings/Preferences/PriorityModePage.tsx +++ b/src/pages/settings/Preferences/PriorityModePage.tsx @@ -45,10 +45,7 @@ function PriorityModePage() { ); return ( - + Navigation.goBack()} diff --git a/src/pages/settings/Preferences/ThemePage.tsx b/src/pages/settings/Preferences/ThemePage.tsx index 274fbee38912f..5911cc880a42e 100644 --- a/src/pages/settings/Preferences/ThemePage.tsx +++ b/src/pages/settings/Preferences/ThemePage.tsx @@ -40,10 +40,7 @@ function ThemePage() { }; return ( - + Navigation.goBack()} diff --git a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx index e0bf0e781e883..d899080037ac3 100644 --- a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx @@ -60,10 +60,7 @@ function CountrySelectionPage({route, navigation}: CountrySelectionPageProps) { ); return ( - + + + {isLoadingApp && !currentUserPersonalDetails.pronouns ? ( ) : ( diff --git a/src/pages/settings/Profile/TimezoneSelectPage.tsx b/src/pages/settings/Profile/TimezoneSelectPage.tsx index cee713065de71..ff0aac4e1bfb7 100644 --- a/src/pages/settings/Profile/TimezoneSelectPage.tsx +++ b/src/pages/settings/Profile/TimezoneSelectPage.tsx @@ -58,10 +58,7 @@ function TimezoneSelectPage({currentUserPersonalDetails}: TimezoneSelectPageProp }; return ( - + Navigation.goBack(ROUTES.SETTINGS_TIMEZONE)} diff --git a/src/pages/settings/Report/NotificationPreferencePage.tsx b/src/pages/settings/Report/NotificationPreferencePage.tsx index 434505ad473ef..0fed154d698d3 100644 --- a/src/pages/settings/Report/NotificationPreferencePage.tsx +++ b/src/pages/settings/Report/NotificationPreferencePage.tsx @@ -52,10 +52,7 @@ function NotificationPreferencePage({report}: NotificationPreferencePageProps) { ); return ( - + + + + + + diff --git a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage.tsx b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage.tsx index bc3dc588c1b16..ac61bd3eaf598 100644 --- a/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage.tsx +++ b/src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthPage.tsx @@ -13,7 +13,6 @@ function TwoFactorAuthPage() { return ( diff --git a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx index b323c668b0b5a..d05f74c1bfc25 100644 --- a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx +++ b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx @@ -68,7 +68,6 @@ function CardAuthenticationModal({headerTitle, policyID}: CardAuthenticationModa diff --git a/src/pages/settings/Subscription/RequestEarlyCancellationPage/index.tsx b/src/pages/settings/Subscription/RequestEarlyCancellationPage/index.tsx index 922293dc06512..abbadfb8233ce 100644 --- a/src/pages/settings/Subscription/RequestEarlyCancellationPage/index.tsx +++ b/src/pages/settings/Subscription/RequestEarlyCancellationPage/index.tsx @@ -124,7 +124,6 @@ function RequestEarlyCancellationPage() { return ( diff --git a/src/pages/settings/Subscription/SubscriptionSize/index.tsx b/src/pages/settings/Subscription/SubscriptionSize/index.tsx index 71febe24ca4c5..d0d5714cce6d3 100644 --- a/src/pages/settings/Subscription/SubscriptionSize/index.tsx +++ b/src/pages/settings/Subscription/SubscriptionSize/index.tsx @@ -55,7 +55,6 @@ function SubscriptionSizePage({route}: SubscriptionSizePageProps) { return ( nameOnCardRef.current?.focus()} - includeSafeAreaPaddingBottom={false} testID={DebitCardPage.displayName} > {showNavigation && ( diff --git a/src/pages/signin/SignInModal.tsx b/src/pages/signin/SignInModal.tsx index 8cfa3ba3dcc80..824a7c9bfba89 100644 --- a/src/pages/signin/SignInModal.tsx +++ b/src/pages/signin/SignInModal.tsx @@ -38,7 +38,6 @@ function SignInModal() { return ( + setDidScreenTransitionEnd(true)} > diff --git a/src/pages/wallet/WalletStatementPage.tsx b/src/pages/wallet/WalletStatementPage.tsx index 4a363e19e4903..b1a0ec5bc0134 100644 --- a/src/pages/wallet/WalletStatementPage.tsx +++ b/src/pages/wallet/WalletStatementPage.tsx @@ -89,7 +89,6 @@ function WalletStatementPage({route}: WalletStatementPageProps) { return ( - + Navigation.goBack()} diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index acd0b158fa677..5a9bc9ef80253 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -426,7 +426,6 @@ function WorkspacesListPage() { if (isEmptyObject(workspaces)) { return ( diff --git a/src/pages/workspace/categories/CategoryApproverPage.tsx b/src/pages/workspace/categories/CategoryApproverPage.tsx index 78f5f579bf932..9e6ce3ca86bef 100644 --- a/src/pages/workspace/categories/CategoryApproverPage.tsx +++ b/src/pages/workspace/categories/CategoryApproverPage.tsx @@ -35,7 +35,6 @@ function CategoryApproverPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_CATEGORIES_ENABLED} > diff --git a/src/pages/workspace/categories/ExpenseLimitTypeSelector/ExpenseLimitTypeSelectorModal.tsx b/src/pages/workspace/categories/ExpenseLimitTypeSelector/ExpenseLimitTypeSelectorModal.tsx index 7563bea7d031b..4e181f0e20077 100644 --- a/src/pages/workspace/categories/ExpenseLimitTypeSelector/ExpenseLimitTypeSelectorModal.tsx +++ b/src/pages/workspace/categories/ExpenseLimitTypeSelector/ExpenseLimitTypeSelectorModal.tsx @@ -50,7 +50,6 @@ function ExpenseLimitTypeSelectorModal({isVisible, currentExpenseLimitType, onEx diff --git a/src/pages/workspace/companyCards/WorkspaceCompanyCardDetailsPage.tsx b/src/pages/workspace/companyCards/WorkspaceCompanyCardDetailsPage.tsx index 6528d35b33747..19e87f5215b31 100644 --- a/src/pages/workspace/companyCards/WorkspaceCompanyCardDetailsPage.tsx +++ b/src/pages/workspace/companyCards/WorkspaceCompanyCardDetailsPage.tsx @@ -83,10 +83,7 @@ function WorkspaceCompanyCardDetailsPage({route}: WorkspaceCompanyCardDetailsPag policyID={policyID} featureName={CONST.POLICY.MORE_FEATURES.ARE_COMPANY_CARDS_ENABLED} > - + {({safeAreaPaddingBottomStyle}) => ( <> diff --git a/src/pages/workspace/companyCards/addNew/AmexCustomFeed.tsx b/src/pages/workspace/companyCards/addNew/AmexCustomFeed.tsx index d8ce6d6159d58..39956e388324c 100644 --- a/src/pages/workspace/companyCards/addNew/AmexCustomFeed.tsx +++ b/src/pages/workspace/companyCards/addNew/AmexCustomFeed.tsx @@ -71,7 +71,6 @@ function AmexCustomFeed() { return ( diff --git a/src/pages/workspace/companyCards/addNew/BankConnection/index.native.tsx b/src/pages/workspace/companyCards/addNew/BankConnection/index.native.tsx index 76bf9b2bd9674..b1553bf59a5b1 100644 --- a/src/pages/workspace/companyCards/addNew/BankConnection/index.native.tsx +++ b/src/pages/workspace/companyCards/addNew/BankConnection/index.native.tsx @@ -80,7 +80,6 @@ function BankConnection({policyID}: BankConnectionStepProps) { diff --git a/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx b/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx index 26899ed9e50f6..2c99334807bea 100644 --- a/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx +++ b/src/pages/workspace/companyCards/addNew/CardTypeStep.tsx @@ -99,7 +99,6 @@ function CardTypeStep() { return ( diff --git a/src/pages/workspace/companyCards/addNew/SelectBankStep.tsx b/src/pages/workspace/companyCards/addNew/SelectBankStep.tsx index 15ead5b9a3238..c7309235c8f6b 100644 --- a/src/pages/workspace/companyCards/addNew/SelectBankStep.tsx +++ b/src/pages/workspace/companyCards/addNew/SelectBankStep.tsx @@ -71,7 +71,6 @@ function SelectBankStep() { return ( diff --git a/src/pages/workspace/companyCards/addNew/SelectFeedType.tsx b/src/pages/workspace/companyCards/addNew/SelectFeedType.tsx index 7fe8da2f99546..5123b3ef915c1 100644 --- a/src/pages/workspace/companyCards/addNew/SelectFeedType.tsx +++ b/src/pages/workspace/companyCards/addNew/SelectFeedType.tsx @@ -61,7 +61,6 @@ function SelectFeedType() { return ( diff --git a/src/pages/workspace/companyCards/assignCard/AssignCardFeedPage.tsx b/src/pages/workspace/companyCards/assignCard/AssignCardFeedPage.tsx index 7d6d415065242..169d0c524edcc 100644 --- a/src/pages/workspace/companyCards/assignCard/AssignCardFeedPage.tsx +++ b/src/pages/workspace/companyCards/assignCard/AssignCardFeedPage.tsx @@ -38,7 +38,6 @@ function AssignCardFeedPage({route, policy}: AssignCardFeedPageProps) { return ( diff --git a/src/pages/workspace/companyCards/assignCard/BankConnection/index.native.tsx b/src/pages/workspace/companyCards/assignCard/BankConnection/index.native.tsx index aec2c9ece0cdf..73aa2effdc03b 100644 --- a/src/pages/workspace/companyCards/assignCard/BankConnection/index.native.tsx +++ b/src/pages/workspace/companyCards/assignCard/BankConnection/index.native.tsx @@ -59,7 +59,6 @@ function BankConnection({policyID, feed}: BankConnectionStepProps) { diff --git a/src/pages/workspace/companyCards/assignCard/CardSelectionStep.tsx b/src/pages/workspace/companyCards/assignCard/CardSelectionStep.tsx index 616a74e17f1e1..b9cb9d5e01944 100644 --- a/src/pages/workspace/companyCards/assignCard/CardSelectionStep.tsx +++ b/src/pages/workspace/companyCards/assignCard/CardSelectionStep.tsx @@ -157,7 +157,6 @@ function CardSelectionStep({feed, policyID}: CardSelectionStepProps) { } shouldShowTextInputAfterHeader - includeSafeAreaPaddingBottom={false} shouldShowListEmptyContent={false} shouldUpdateFocusedIndex /> diff --git a/src/pages/workspace/companyCards/assignCard/TransactionStartDateSelectorModal.tsx b/src/pages/workspace/companyCards/assignCard/TransactionStartDateSelectorModal.tsx index 8c0990800bb4c..55cf60e1185a7 100644 --- a/src/pages/workspace/companyCards/assignCard/TransactionStartDateSelectorModal.tsx +++ b/src/pages/workspace/companyCards/assignCard/TransactionStartDateSelectorModal.tsx @@ -51,7 +51,6 @@ function TransactionStartDateSelectorModal({isVisible, date, handleSelectDate, o diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateTaxRateEditPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateTaxRateEditPage.tsx index 06a8faf29c1df..9c65dd23ab7c0 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateTaxRateEditPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateTaxRateEditPage.tsx @@ -61,7 +61,6 @@ function PolicyDistanceRateTaxRateEditPage({route, policy}: PolicyDistanceRateTa featureName={CONST.POLICY.MORE_FEATURES.ARE_DISTANCE_RATES_ENABLED} > diff --git a/src/pages/workspace/distanceRates/UnitSelector/UnitSelectorModal.tsx b/src/pages/workspace/distanceRates/UnitSelector/UnitSelectorModal.tsx index 34eb21ce19c46..fad6fc69838c2 100644 --- a/src/pages/workspace/distanceRates/UnitSelector/UnitSelectorModal.tsx +++ b/src/pages/workspace/distanceRates/UnitSelector/UnitSelectorModal.tsx @@ -40,7 +40,6 @@ function UnitSelectorModal({isVisible, currentUnit, onUnitSelected, onClose, lab diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx index 5da459be4a160..5ad27545a92af 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx @@ -185,7 +185,6 @@ function WorkspaceExpensifyCardBankAccounts({route}: WorkspaceExpensifyCardBankA > diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx index fdef6ecdc481f..c98c298879030 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx @@ -86,10 +86,7 @@ function WorkspaceExpensifyCardDetailsPage({route}: WorkspaceExpensifyCardDetail policyID={policyID} featureName={CONST.POLICY.MORE_FEATURES.ARE_EXPENSIFY_CARDS_ENABLED} > - + {({safeAreaPaddingBottomStyle}) => ( <> diff --git a/src/pages/workspace/perDiem/WorkspacePerDiemDetailsPage.tsx b/src/pages/workspace/perDiem/WorkspacePerDiemDetailsPage.tsx index 3e53a1681274e..5acda2c9bf25c 100644 --- a/src/pages/workspace/perDiem/WorkspacePerDiemDetailsPage.tsx +++ b/src/pages/workspace/perDiem/WorkspacePerDiemDetailsPage.tsx @@ -67,7 +67,6 @@ function WorkspacePerDiemDetailsPage({route}: WorkspacePerDiemDetailsPageProps) featureName={CONST.POLICY.MORE_FEATURES.ARE_PER_DIEM_RATES_ENABLED} > diff --git a/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx b/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx index 1f51af583d8a9..24aae601e9153 100644 --- a/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx +++ b/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx @@ -335,7 +335,6 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_PER_DIEM_RATES_ENABLED} > diff --git a/src/pages/workspace/reportFields/InitialListValueSelector/InitialListValueSelectorModal.tsx b/src/pages/workspace/reportFields/InitialListValueSelector/InitialListValueSelectorModal.tsx index fa6c5dc76bdbf..81f038ad76df0 100644 --- a/src/pages/workspace/reportFields/InitialListValueSelector/InitialListValueSelectorModal.tsx +++ b/src/pages/workspace/reportFields/InitialListValueSelector/InitialListValueSelectorModal.tsx @@ -47,7 +47,6 @@ function InitialListValueSelectorModal({isVisible, currentValue, label, subtitle diff --git a/src/pages/workspace/reportFields/ReportFieldsValueSettingsPage.tsx b/src/pages/workspace/reportFields/ReportFieldsValueSettingsPage.tsx index 08b94fcc4aee8..ee3edd159fa2a 100644 --- a/src/pages/workspace/reportFields/ReportFieldsValueSettingsPage.tsx +++ b/src/pages/workspace/reportFields/ReportFieldsValueSettingsPage.tsx @@ -94,7 +94,6 @@ function ReportFieldsValueSettingsPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_REPORT_FIELDS_ENABLED} > diff --git a/src/pages/workspace/reportFields/TypeSelector/TypeSelectorModal.tsx b/src/pages/workspace/reportFields/TypeSelector/TypeSelectorModal.tsx index ca64dda455a46..1331af715d103 100644 --- a/src/pages/workspace/reportFields/TypeSelector/TypeSelectorModal.tsx +++ b/src/pages/workspace/reportFields/TypeSelector/TypeSelectorModal.tsx @@ -45,7 +45,6 @@ function TypeSelectorModal({isVisible, currentType, label, subtitle, onTypeSelec diff --git a/src/pages/workspace/tags/TagApproverPage.tsx b/src/pages/workspace/tags/TagApproverPage.tsx index 9ad97a1738a75..585ebf3cf072d 100644 --- a/src/pages/workspace/tags/TagApproverPage.tsx +++ b/src/pages/workspace/tags/TagApproverPage.tsx @@ -38,7 +38,6 @@ function TagApproverPage({route}: TagApproverPageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED} > diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index cd3510cfffb58..a723affe12244 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -361,7 +361,6 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_TAGS_ENABLED} > {({policy}) => ( diff --git a/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx b/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx index 173c89c415513..5010f122f04fa 100644 --- a/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx @@ -252,7 +252,6 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_TAGS_ENABLED} > diff --git a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx index 4dddcb42265d5..e6baaadb01ad9 100644 --- a/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceCreateTaxPage.tsx @@ -72,7 +72,6 @@ function WorkspaceCreateTaxPage({ > diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index e064c04878a13..27463416e77dc 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -290,7 +290,6 @@ function WorkspaceTaxesPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_TAXES_ENABLED} > - + - + - + Date: Wed, 22 Jan 2025 17:23:13 +0100 Subject: [PATCH 08/18] refactor: rename StyleUtils safe area padding function --- src/components/AutoCompleteSuggestions/index.tsx | 2 +- .../GrowlNotificationContainer/index.native.tsx | 2 +- src/components/Modal/BaseModal.tsx | 2 +- src/components/PopoverWithoutOverlay/index.tsx | 2 +- src/components/SafeAreaConsumer/index.tsx | 2 +- src/pages/ErrorPage/UpdateRequiredView.tsx | 2 +- src/pages/signin/SignInPage.tsx | 2 +- src/styles/utils/index.ts | 6 +++--- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/AutoCompleteSuggestions/index.tsx b/src/components/AutoCompleteSuggestions/index.tsx index 9703bb739785b..9434b8865b44c 100644 --- a/src/components/AutoCompleteSuggestions/index.tsx +++ b/src/components/AutoCompleteSuggestions/index.tsx @@ -64,7 +64,7 @@ function AutoCompleteSuggestions({measureParentContainerAndReportCu const StyleUtils = useStyleUtils(); const insets = useSafeAreaInsets(); const {keyboardHeight} = useKeyboardState(); - const {paddingBottom: bottomInset, paddingTop: topInset} = StyleUtils.getSafeAreaPadding(insets ?? undefined); + const {paddingBottom: bottomInset, paddingTop: topInset} = StyleUtils.getPlatformSafeAreaPadding(insets ?? undefined); useEffect(() => { const container = containerRef.current; diff --git a/src/components/GrowlNotification/GrowlNotificationContainer/index.native.tsx b/src/components/GrowlNotification/GrowlNotificationContainer/index.native.tsx index 0ca7756b0e0e7..f7ddf2767402a 100644 --- a/src/components/GrowlNotification/GrowlNotificationContainer/index.native.tsx +++ b/src/components/GrowlNotification/GrowlNotificationContainer/index.native.tsx @@ -11,7 +11,7 @@ function GrowlNotificationContainer({children, translateY}: GrowlNotificationCon const insets = useSafeAreaInsets(); const animatedStyles = useAnimatedStyle(() => styles.growlNotificationTranslateY(translateY)); - return {children}; + return {children}; } GrowlNotificationContainer.displayName = 'GrowlNotificationContainer'; diff --git a/src/components/Modal/BaseModal.tsx b/src/components/Modal/BaseModal.tsx index e1c5a7c48b868..7729bd2b5e6b8 100644 --- a/src/components/Modal/BaseModal.tsx +++ b/src/components/Modal/BaseModal.tsx @@ -184,7 +184,7 @@ function BaseModal( paddingBottom: safeAreaPaddingBottom, paddingLeft: safeAreaPaddingLeft, paddingRight: safeAreaPaddingRight, - } = StyleUtils.getSafeAreaPadding(safeAreaInsets); + } = StyleUtils.getPlatformSafeAreaPadding(safeAreaInsets); const modalPaddingStyles = shouldUseModalPaddingStyle ? StyleUtils.getModalPaddingStyles({ diff --git a/src/components/PopoverWithoutOverlay/index.tsx b/src/components/PopoverWithoutOverlay/index.tsx index 7d58ad6d22be3..28a3f0a85bc1f 100644 --- a/src/components/PopoverWithoutOverlay/index.tsx +++ b/src/components/PopoverWithoutOverlay/index.tsx @@ -77,7 +77,7 @@ function PopoverWithoutOverlay( paddingBottom: safeAreaPaddingBottom, paddingLeft: safeAreaPaddingLeft, paddingRight: safeAreaPaddingRight, - } = useMemo(() => StyleUtils.getSafeAreaPadding(insets), [StyleUtils, insets]); + } = useMemo(() => StyleUtils.getPlatformSafeAreaPadding(insets), [StyleUtils, insets]); const modalPaddingStyles = useMemo( () => diff --git a/src/components/SafeAreaConsumer/index.tsx b/src/components/SafeAreaConsumer/index.tsx index 416021242225f..8cc8d531905b0 100644 --- a/src/components/SafeAreaConsumer/index.tsx +++ b/src/components/SafeAreaConsumer/index.tsx @@ -16,7 +16,7 @@ function SafeAreaConsumer({children}: SafeAreaConsumerProps) { {(safeAreaInsets) => { const insets = StyleUtils.getSafeAreaInsets(safeAreaInsets); - const {paddingTop, paddingBottom} = StyleUtils.getSafeAreaPadding(insets); + const {paddingTop, paddingBottom} = StyleUtils.getPlatformSafeAreaPadding(insets); return children({ paddingTop, diff --git a/src/pages/ErrorPage/UpdateRequiredView.tsx b/src/pages/ErrorPage/UpdateRequiredView.tsx index 750a3c891b0fd..c4f1272654fda 100644 --- a/src/pages/ErrorPage/UpdateRequiredView.tsx +++ b/src/pages/ErrorPage/UpdateRequiredView.tsx @@ -25,7 +25,7 @@ function UpdateRequiredView() { const isStandaloneNewAppProduction = isProduction && !NativeModules.HybridAppModule; return ( - +
diff --git a/src/pages/signin/SignInPage.tsx b/src/pages/signin/SignInPage.tsx index 221ca93701bee..44fd8776b43f1 100644 --- a/src/pages/signin/SignInPage.tsx +++ b/src/pages/signin/SignInPage.tsx @@ -302,7 +302,7 @@ function SignInPage({shouldEnableMaxHeight = true}: SignInPageInnerProps, ref: F Date: Wed, 22 Jan 2025 18:54:53 +0100 Subject: [PATCH 09/18] refactor: simplify code in `useStyledSafeAreaInsets` hook --- src/hooks/useStyledSafeAreaInsets.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/hooks/useStyledSafeAreaInsets.ts b/src/hooks/useStyledSafeAreaInsets.ts index b5a7bd2413c46..e320b6df466a5 100644 --- a/src/hooks/useStyledSafeAreaInsets.ts +++ b/src/hooks/useStyledSafeAreaInsets.ts @@ -34,27 +34,29 @@ import useStyleUtils from './useStyleUtils'; function useStyledSafeAreaInsets() { const StyleUtils = useStyleUtils(); const insets = useSafeAreaInsets(); - const {paddingTop, paddingBottom} = StyleUtils.getSafeAreaPadding(insets); + const {paddingTop: platformPaddingTop, paddingBottom: platformPaddingBottom} = StyleUtils.getPlatformSafeAreaPadding(insets); const screenWrapperStatusContext = useContext(ScreenWrapperStatusContext); - const isSafeAreaTopPaddingApplied = screenWrapperStatusContext?.isSafeAreaTopPaddingApplied ?? false; - const isSafeAreaBottomPaddingApplied = screenWrapperStatusContext?.isSafeAreaBottomPaddingApplied ?? false; + const isTopAlreadyApplied = screenWrapperStatusContext?.isSafeAreaTopPaddingApplied ?? false; + const isBottomAlreadyApplied = screenWrapperStatusContext?.isSafeAreaBottomPaddingApplied ?? false; const adaptedInsets = { ...insets, - top: isSafeAreaTopPaddingApplied ? 0 : insets?.top, - bottom: isSafeAreaBottomPaddingApplied ? 0 : insets?.bottom, + top: isTopAlreadyApplied ? 0 : insets?.top, + bottom: isBottomAlreadyApplied ? 0 : insets?.bottom, }; - const adaptedPaddingBottom = isSafeAreaBottomPaddingApplied ? 0 : paddingBottom; - const safeAreaPaddingBottomStyle = useMemo(() => ({paddingBottom: adaptedPaddingBottom}), [adaptedPaddingBottom]); + const paddingTop = isTopAlreadyApplied ? 0 : platformPaddingTop; + const paddingBottom = isBottomAlreadyApplied ? 0 : platformPaddingBottom; + + const safeAreaPaddingBottomStyle = useMemo(() => ({paddingBottom}), [paddingBottom]); return { - paddingTop: isSafeAreaTopPaddingApplied ? 0 : paddingTop, - paddingBottom: adaptedPaddingBottom, + paddingTop, + paddingBottom, unmodifiedPaddings: { - top: paddingTop, - bottom: paddingBottom, + top: platformPaddingTop, + bottom: platformPaddingBottom, }, insets: adaptedInsets, safeAreaPaddingBottomStyle, From e311323e4aa4a4fbaf432aace7b9a8b509d61d35 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 22 Jan 2025 18:55:21 +0100 Subject: [PATCH 10/18] feat: implement android navigation bar type specific bottom safe area insets --- src/CONST.ts | 10 +++++++++ .../getNavigationBarType/index.android.ts | 22 +++++++++++++++++++ .../utils/getNavigationBarType/index.ios.ts | 16 ++++++++++++++ .../utils/getNavigationBarType/index.ts | 8 +++++++ .../utils/getNavigationBarType/types.ts | 7 ++++++ src/styles/utils/index.ts | 21 +++++++++++++++++- 6 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 src/styles/utils/getNavigationBarType/index.android.ts create mode 100644 src/styles/utils/getNavigationBarType/index.ios.ts create mode 100644 src/styles/utils/getNavigationBarType/index.ts create mode 100644 src/styles/utils/getNavigationBarType/types.ts diff --git a/src/CONST.ts b/src/CONST.ts index 72486e37abbed..f69568fbffc4c 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1360,6 +1360,16 @@ const CONST = { LIGHT: 'light', DARK: 'dark', }, + NAVIGATION_BAR_TYPE: { + STATIC_SOFT_KEYS: 'static-soft-keys', + HIDDEN_SOFT_KEYS_OR_NONE: 'hidden-soft-keys-or-none', + GESTURE_BAR: 'gesture-bar', + }, + // Currently, in Android there is no native API to detect the type of navigation bar (soft keys vs. gesture). + // According to this source, the navigation bar on (standard) Android devices is always 48dpi (device independent pixels) tall. + // To leave room to detect soft-key navigation bars on non-standard Android devices, + // we set this height threshold to 30, since gesture bars are will never be taller than 30dpi. + NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD: 30, TRANSACTION: { DEFAULT_MERCHANT: 'Expense', UNKNOWN_MERCHANT: 'Unknown Merchant', diff --git a/src/styles/utils/getNavigationBarType/index.android.ts b/src/styles/utils/getNavigationBarType/index.android.ts new file mode 100644 index 0000000000000..d8feea7dd9b92 --- /dev/null +++ b/src/styles/utils/getNavigationBarType/index.android.ts @@ -0,0 +1,22 @@ +import type {EdgeInsets} from 'react-native-safe-area-context'; +import CONST from '@src/CONST'; +import type {NavigationBarType} from './types'; + +function getNavigationBarType(insets?: EdgeInsets): NavigationBarType { + const bottomInset = insets?.bottom ?? 0; + + // If the bottom safe area inset is greater than the defined Android minimum soft keys height threshold, we consider it as a static soft keys. + if (bottomInset > CONST.NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD) { + return 'static-soft-keys'; + } + + // If the bottom safe area inset is greater than 0, we consider it as a gesture bar. + if (bottomInset > 0) { + return 'gesture-bar'; + } + + // If the bottom safe area inset is 0, we consider it as hidden soft keys or no navigation bar (e.g. physical buttons). + return 'hidden-soft-keys-or-none'; +} + +export default getNavigationBarType; diff --git a/src/styles/utils/getNavigationBarType/index.ios.ts b/src/styles/utils/getNavigationBarType/index.ios.ts new file mode 100644 index 0000000000000..cffd31e53e9c2 --- /dev/null +++ b/src/styles/utils/getNavigationBarType/index.ios.ts @@ -0,0 +1,16 @@ +import type {EdgeInsets} from 'react-native-safe-area-context'; +import type {NavigationBarType} from './types'; + +function getNavigationBarType(insets?: EdgeInsets): NavigationBarType { + const bottomInset = insets?.bottom ?? 0; + + // On iOS, if there is a bottom safe area inset, it means the device uses a gesture bar. + if (bottomInset > 0) { + return 'gesture-bar'; + } + + // If there is no bottom safe area inset, the device uses a physical navigation button. + return 'hidden-soft-keys-or-none'; +} + +export default getNavigationBarType; diff --git a/src/styles/utils/getNavigationBarType/index.ts b/src/styles/utils/getNavigationBarType/index.ts new file mode 100644 index 0000000000000..7a58c27762e65 --- /dev/null +++ b/src/styles/utils/getNavigationBarType/index.ts @@ -0,0 +1,8 @@ +import type {NavigationBarType} from './types'; + +function getNavigationBarType(): NavigationBarType { + // On web, there is no navigation bar. + return 'hidden-soft-keys-or-none'; +} + +export default getNavigationBarType; diff --git a/src/styles/utils/getNavigationBarType/types.ts b/src/styles/utils/getNavigationBarType/types.ts new file mode 100644 index 0000000000000..a8ca1452b546a --- /dev/null +++ b/src/styles/utils/getNavigationBarType/types.ts @@ -0,0 +1,7 @@ +import type {ValueOf} from 'type-fest'; +import type CONST from '@src/CONST'; + +type NavigationBarType = ValueOf; + +// eslint-disable-next-line import/prefer-default-export +export type {NavigationBarType}; diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index 2dff483fe78dd..2731e06398f18 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -24,6 +24,7 @@ import createReportActionContextMenuStyleUtils from './generators/ReportActionCo import createTooltipStyleUtils from './generators/TooltipStyleUtils'; import getContextMenuItemStyles from './getContextMenuItemStyles'; import getHighResolutionInfoWrapperStyle from './getHighResolutionInfoWrapperStyle'; +import getNavigationBarType from './getNavigationBarType/index.android'; import getNavigationModalCardStyle from './getNavigationModalCardStyles'; import getSafeAreaInsets from './getSafeAreaInsets'; import getSignInBgStyles from './getSignInBgStyles'; @@ -327,6 +328,12 @@ type SafeAreaPadding = { paddingBottom: number; paddingLeft: number; paddingRight: number; + + /** + * If we the device has a gesture bar (soft keys or gesture bar), this is the height of the gesture bar. + * Since `paddingBottom` is set to 0 on devices with gesture bar, this value is used to add padding to the bottom of the screen if necessary. + */ + gestureBarHeight: number; }; /** @@ -334,6 +341,17 @@ type SafeAreaPadding = { */ function getPlatformSafeAreaPadding(insets?: EdgeInsets, insetsPercentageProp?: number): SafeAreaPadding { const platform = getPlatform(); + const navigationBarType = getNavigationBarType(insets); + + // If the navigation bar is a gesture bar, we want `paddingBottom` to be 0, + // while providing the `gestureBarHeight` as an extra property + let platformBottomInset = insets?.bottom ?? 0; + let gestureBarHeight = 0; + if (navigationBarType === 'gesture-bar') { + gestureBarHeight = platformBottomInset; + platformBottomInset = 0; + } + let insetsPercentage = insetsPercentageProp; if (insetsPercentage == null) { switch (platform) { @@ -350,9 +368,10 @@ function getPlatformSafeAreaPadding(insets?: EdgeInsets, insetsPercentageProp?: return { paddingTop: insets?.top ?? 0, - paddingBottom: (insets?.bottom ?? 0) * insetsPercentage, + paddingBottom: platformBottomInset * insetsPercentage, paddingLeft: (insets?.left ?? 0) * insetsPercentage, paddingRight: (insets?.right ?? 0) * insetsPercentage, + gestureBarHeight, }; } From 02f4bf102cc3885e606c2dd0de15d88d9d40d99f Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 22 Jan 2025 18:57:16 +0100 Subject: [PATCH 11/18] fix: add source url --- src/CONST.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CONST.ts b/src/CONST.ts index f69568fbffc4c..e8d1415467bd9 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1366,6 +1366,7 @@ const CONST = { GESTURE_BAR: 'gesture-bar', }, // Currently, in Android there is no native API to detect the type of navigation bar (soft keys vs. gesture). + // https://forums.solar2d.com/t/height-of-android-navigation-bar-solved/353073 // According to this source, the navigation bar on (standard) Android devices is always 48dpi (device independent pixels) tall. // To leave room to detect soft-key navigation bars on non-standard Android devices, // we set this height threshold to 30, since gesture bars are will never be taller than 30dpi. From bc92d69229727ec791786fa160c25170cb341f04 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 22 Jan 2025 19:53:04 +0100 Subject: [PATCH 12/18] fix: use CONST values and add comments --- src/CONST.ts | 13 ++++++++----- .../utils/getNavigationBarType/index.android.ts | 9 +++++---- src/styles/utils/getNavigationBarType/index.ios.ts | 5 +++-- src/styles/utils/getNavigationBarType/index.ts | 3 ++- src/styles/utils/index.ts | 2 +- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index e8d1415467bd9..1ffa9e11dc74b 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1361,15 +1361,18 @@ const CONST = { DARK: 'dark', }, NAVIGATION_BAR_TYPE: { - STATIC_SOFT_KEYS: 'static-soft-keys', - HIDDEN_SOFT_KEYS_OR_NONE: 'hidden-soft-keys-or-none', + // We consider there to be no navigation bar in one of these cases: + // 1. The device has physical navigation buttons + // 2. The device uses gesture navigation without a gesture bar. + // 3. The device uses hidden (auto-hiding) soft keys. + NONE: 'none', + SOFT_KEYS: 'soft-keys', GESTURE_BAR: 'gesture-bar', }, // Currently, in Android there is no native API to detect the type of navigation bar (soft keys vs. gesture). - // https://forums.solar2d.com/t/height-of-android-navigation-bar-solved/353073 - // According to this source, the navigation bar on (standard) Android devices is always 48dpi (device independent pixels) tall. + // The navigation bar on (standard) Android devices is around 40-48dpi (device independent pixels) tall. // To leave room to detect soft-key navigation bars on non-standard Android devices, - // we set this height threshold to 30, since gesture bars are will never be taller than 30dpi. + // we set this height threshold to 30dpi, since gesture bars will never be taller than that. NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD: 30, TRANSACTION: { DEFAULT_MERCHANT: 'Expense', diff --git a/src/styles/utils/getNavigationBarType/index.android.ts b/src/styles/utils/getNavigationBarType/index.android.ts index d8feea7dd9b92..9a8e53e11fa2f 100644 --- a/src/styles/utils/getNavigationBarType/index.android.ts +++ b/src/styles/utils/getNavigationBarType/index.android.ts @@ -7,16 +7,17 @@ function getNavigationBarType(insets?: EdgeInsets): NavigationBarType { // If the bottom safe area inset is greater than the defined Android minimum soft keys height threshold, we consider it as a static soft keys. if (bottomInset > CONST.NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD) { - return 'static-soft-keys'; + return CONST.NAVIGATION_BAR_TYPE.SOFT_KEYS; } // If the bottom safe area inset is greater than 0, we consider it as a gesture bar. if (bottomInset > 0) { - return 'gesture-bar'; + return CONST.NAVIGATION_BAR_TYPE.GESTURE_BAR; } - // If the bottom safe area inset is 0, we consider it as hidden soft keys or no navigation bar (e.g. physical buttons). - return 'hidden-soft-keys-or-none'; + // If the bottom safe area inset is 0, we consider the device to have no navigation bar (or it being hidden by default). + // This could be mean either hidden soft keys, gesture navigation without a gesture bar or physical buttons. + return CONST.NAVIGATION_BAR_TYPE.NONE; } export default getNavigationBarType; diff --git a/src/styles/utils/getNavigationBarType/index.ios.ts b/src/styles/utils/getNavigationBarType/index.ios.ts index cffd31e53e9c2..a53e0d05da940 100644 --- a/src/styles/utils/getNavigationBarType/index.ios.ts +++ b/src/styles/utils/getNavigationBarType/index.ios.ts @@ -1,4 +1,5 @@ import type {EdgeInsets} from 'react-native-safe-area-context'; +import CONST from '@src/CONST'; import type {NavigationBarType} from './types'; function getNavigationBarType(insets?: EdgeInsets): NavigationBarType { @@ -6,11 +7,11 @@ function getNavigationBarType(insets?: EdgeInsets): NavigationBarType { // On iOS, if there is a bottom safe area inset, it means the device uses a gesture bar. if (bottomInset > 0) { - return 'gesture-bar'; + return CONST.NAVIGATION_BAR_TYPE.GESTURE_BAR; } // If there is no bottom safe area inset, the device uses a physical navigation button. - return 'hidden-soft-keys-or-none'; + return CONST.NAVIGATION_BAR_TYPE.NONE; } export default getNavigationBarType; diff --git a/src/styles/utils/getNavigationBarType/index.ts b/src/styles/utils/getNavigationBarType/index.ts index 7a58c27762e65..90639fa31847d 100644 --- a/src/styles/utils/getNavigationBarType/index.ts +++ b/src/styles/utils/getNavigationBarType/index.ts @@ -1,8 +1,9 @@ +import CONST from '@src/CONST'; import type {NavigationBarType} from './types'; function getNavigationBarType(): NavigationBarType { // On web, there is no navigation bar. - return 'hidden-soft-keys-or-none'; + return CONST.NAVIGATION_BAR_TYPE.NONE; } export default getNavigationBarType; diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index 2731e06398f18..c01605b84ccdc 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -347,7 +347,7 @@ function getPlatformSafeAreaPadding(insets?: EdgeInsets, insetsPercentageProp?: // while providing the `gestureBarHeight` as an extra property let platformBottomInset = insets?.bottom ?? 0; let gestureBarHeight = 0; - if (navigationBarType === 'gesture-bar') { + if (navigationBarType === CONST.NAVIGATION_BAR_TYPE.GESTURE_BAR) { gestureBarHeight = platformBottomInset; platformBottomInset = 0; } From 18be142081b12e6b49e68f4943d4f46a8ce7db67 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Wed, 22 Jan 2025 20:04:04 +0100 Subject: [PATCH 13/18] update comment about navigation bar height threshold --- src/CONST.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 1ffa9e11dc74b..397336b1cb907 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1370,9 +1370,9 @@ const CONST = { GESTURE_BAR: 'gesture-bar', }, // Currently, in Android there is no native API to detect the type of navigation bar (soft keys vs. gesture). - // The navigation bar on (standard) Android devices is around 40-48dpi (device independent pixels) tall. + // The navigation bar on (standard) Android devices is around 30-50dpi tall. (Samsung: 40dpi, Huawei: ~34dpi) // To leave room to detect soft-key navigation bars on non-standard Android devices, - // we set this height threshold to 30dpi, since gesture bars will never be taller than that. + // we set this height threshold to 30dpi, since gesture bars will never be taller than that. (Samsung & Huawei: ~14-15dpi) NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD: 30, TRANSACTION: { DEFAULT_MERCHANT: 'Expense', From 2338952ffb5c2a77ac70f558e963314fbf221cd0 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Mon, 17 Feb 2025 18:27:52 +0100 Subject: [PATCH 14/18] fix: revert navigation bar changes in `getPlatformSafeAreaPadding` --- src/styles/utils/index.ts | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/styles/utils/index.ts b/src/styles/utils/index.ts index b8caff6ecf4ec..b9cfd07326619 100644 --- a/src/styles/utils/index.ts +++ b/src/styles/utils/index.ts @@ -328,12 +328,6 @@ type SafeAreaPadding = { paddingBottom: number; paddingLeft: number; paddingRight: number; - - /** - * If we the device has a gesture bar (soft keys or gesture bar), this is the height of the gesture bar. - * Since `paddingBottom` is set to 0 on devices with gesture bar, this value is used to add padding to the bottom of the screen if necessary. - */ - gestureBarHeight: number; }; /** @@ -341,16 +335,6 @@ type SafeAreaPadding = { */ function getPlatformSafeAreaPadding(insets?: EdgeInsets, insetsPercentageProp?: number): SafeAreaPadding { const platform = getPlatform(); - const navigationBarType = getNavigationBarType(insets); - - // If the navigation bar is a gesture bar, we want `paddingBottom` to be 0, - // while providing the `gestureBarHeight` as an extra property - let platformBottomInset = insets?.bottom ?? 0; - let gestureBarHeight = 0; - if (navigationBarType === CONST.NAVIGATION_BAR_TYPE.GESTURE_BAR) { - gestureBarHeight = platformBottomInset; - platformBottomInset = 0; - } let insetsPercentage = insetsPercentageProp; if (insetsPercentage == null) { @@ -368,10 +352,9 @@ function getPlatformSafeAreaPadding(insets?: EdgeInsets, insetsPercentageProp?: return { paddingTop: insets?.top ?? 0, - paddingBottom: platformBottomInset * insetsPercentage, + paddingBottom: insets?.bottom ?? 0 * insetsPercentage, paddingLeft: (insets?.left ?? 0) * insetsPercentage, paddingRight: (insets?.right ?? 0) * insetsPercentage, - gestureBarHeight, }; } @@ -1268,6 +1251,7 @@ const staticStyleUtils = { getBorderRadiusStyle, getHighResolutionInfoWrapperStyle, getItemBackgroundColorStyle, + getNavigationBarType, }; const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({ From 63d04fe85a69fa04854c5e59410f1e310f72d3c6 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Mon, 17 Feb 2025 18:28:21 +0100 Subject: [PATCH 15/18] fix: remove `includeSafeAreaPaddingBottom={false}` on screens after merge main --- src/pages/Travel/TravelUpgrade.tsx | 1 - src/pages/workspace/accounting/MultiConnectionSelectorPage.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/src/pages/Travel/TravelUpgrade.tsx b/src/pages/Travel/TravelUpgrade.tsx index 78b8f8d7e4880..74247908ecf0a 100644 --- a/src/pages/Travel/TravelUpgrade.tsx +++ b/src/pages/Travel/TravelUpgrade.tsx @@ -55,7 +55,6 @@ function TravelUpgrade() { From 69123c725c4bf7afda5bf31be80532bd03c7f269 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Mon, 17 Feb 2025 20:04:53 +0100 Subject: [PATCH 16/18] feat: disable bottom safe area padding handling completely --- src/components/ScreenWrapper.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/ScreenWrapper.tsx b/src/components/ScreenWrapper.tsx index ee543765169df..424da2e16c6b5 100644 --- a/src/components/ScreenWrapper.tsx +++ b/src/components/ScreenWrapper.tsx @@ -30,6 +30,8 @@ import ModalContext from './Modal/ModalContext'; import OfflineIndicator from './OfflineIndicator'; import withNavigationFallback from './withNavigationFallback'; +const includeSafeAreaPaddingBottom = false; + type ScreenWrapperChildrenProps = { insets: EdgeInsets; safeAreaPaddingBottomStyle?: { @@ -124,7 +126,6 @@ function ScreenWrapper( shouldEnableMinHeight = false, includePaddingTop = true, keyboardAvoidingViewBehavior = 'padding', - includeSafeAreaPaddingBottom = true, shouldEnableKeyboardAvoidingView = true, shouldEnablePickerAvoiding = true, headerGapStyles, @@ -263,7 +264,6 @@ function ScreenWrapper( const {insets, paddingTop, paddingBottom, safeAreaPaddingBottomStyle, unmodifiedPaddings} = useStyledSafeAreaInsets(); const paddingTopStyle: StyleProp = {}; - const paddingBottomStyle: StyleProp = {}; const isSafeAreaTopPaddingApplied = includePaddingTop; if (includePaddingTop) { @@ -273,18 +273,16 @@ function ScreenWrapper( paddingTopStyle.paddingTop = unmodifiedPaddings.top; } + const bottomContentStyle: StyleProp = safeAreaPaddingBottomStyle; // We always need the safe area padding bottom if we're showing the offline indicator since it is bottom-docked. - if (includeSafeAreaPaddingBottom) { - paddingBottomStyle.paddingBottom = paddingBottom; - } if (includeSafeAreaPaddingBottom && ignoreInsetsConsumption) { - paddingBottomStyle.paddingBottom = unmodifiedPaddings.bottom; + bottomContentStyle.paddingBottom = unmodifiedPaddings.bottom; } const isAvoidingViewportScroll = useTackInputFocus(isFocused && shouldEnableMaxHeight && shouldAvoidScrollOnVirtualViewport && isMobileWebKit()); const contextValue = useMemo( () => ({didScreenTransitionEnd, isSafeAreaTopPaddingApplied, isSafeAreaBottomPaddingApplied: includeSafeAreaPaddingBottom}), - [didScreenTransitionEnd, includeSafeAreaPaddingBottom, isSafeAreaTopPaddingApplied], + [didScreenTransitionEnd, isSafeAreaTopPaddingApplied], ); return ( @@ -352,7 +350,7 @@ function ScreenWrapper( - {bottomContent} + {bottomContent && {bottomContent}} ); From 75e46c146066cac807c997e82d5115c3502789d3 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Mon, 17 Feb 2025 20:24:02 +0100 Subject: [PATCH 17/18] fix: remove all `includeSafeAreaPaddingBottom={true}` occurences --- src/components/CategorySelector/CategorySelectorModal.tsx | 1 - src/components/DatePicker/CalendarPicker/YearPickerModal.tsx | 1 - src/components/InteractiveStepWrapper.tsx | 1 - src/components/ScreenWrapper.tsx | 3 +-- src/components/Search/SearchDateFilterBase.tsx | 1 - src/components/TextPicker/TextSelectorModal.tsx | 1 - src/components/TimeModalPicker.tsx | 1 - src/components/ValidateCodeActionModal/index.tsx | 1 - src/components/ValuePicker/ValueSelectorModal.tsx | 1 - src/pages/AddressPage.tsx | 5 +---- src/pages/EditReportFieldPage.tsx | 1 - src/pages/EnablePayments/EnablePaymentsPage.tsx | 1 - src/pages/GroupChatNameEditPage.tsx | 1 - src/pages/NewChatPage.tsx | 1 - .../BaseOnboardingPersonalDetails.tsx | 1 - src/pages/PrivateNotes/PrivateNotesEditPage.tsx | 1 - .../Workspace/WorkspaceAdminRestrictedAction.tsx | 5 +---- .../Workspace/WorkspaceOwnerRestrictedAction.tsx | 5 +---- .../Workspace/WorkspaceUserRestrictedAction.tsx | 5 +---- src/pages/RoomDescriptionPage.tsx | 1 - src/pages/RoomInvitePage.tsx | 1 - src/pages/Search/SavedSearchRenamePage.tsx | 1 - src/pages/Search/SearchAdvancedFiltersPage.tsx | 1 - .../SearchAdvancedFiltersPage/SearchFiltersAmountPage.tsx | 1 - .../SearchAdvancedFiltersPage/SearchFiltersCurrencyPage.tsx | 1 - .../SearchFiltersDescriptionPage.tsx | 1 - .../SearchAdvancedFiltersPage/SearchFiltersFromPage.tsx | 1 - .../SearchAdvancedFiltersPage/SearchFiltersMerchantPage.tsx | 1 - .../SearchAdvancedFiltersPage/SearchFiltersReportIDPage.tsx | 1 - .../Search/SearchAdvancedFiltersPage/SearchFiltersToPage.tsx | 1 - src/pages/TeachersUnite/IntroSchoolPrincipalPage.tsx | 5 +---- src/pages/TeachersUnite/KnowATeacherPage.tsx | 5 +---- src/pages/Travel/TripDetailsPage.tsx | 1 - src/pages/TripChatNameEditPage.tsx | 1 - src/pages/WorkspaceSwitcherPage/index.tsx | 1 - src/pages/iou/HoldReasonFormView.tsx | 1 - src/pages/iou/request/step/IOURequestStepAmount.tsx | 1 - src/pages/iou/request/step/IOURequestStepCurrency.tsx | 1 - src/pages/iou/request/step/IOURequestStepDate.tsx | 1 - .../iou/request/step/IOURequestStepScan/index.native.tsx | 1 - src/pages/iou/request/step/IOURequestStepSendFrom.tsx | 1 - src/pages/iou/request/step/IOURequestStepSubrate.tsx | 1 - src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx | 1 - src/pages/iou/request/step/IOURequestStepTime.tsx | 1 - src/pages/iou/request/step/IOURequestStepWaypoint.tsx | 1 - src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx | 1 - src/pages/settings/Profile/CustomStatus/SetDatePage.tsx | 5 +---- src/pages/settings/Profile/CustomStatus/SetTimePage.tsx | 5 +---- .../settings/Profile/CustomStatus/StatusClearAfterPage.tsx | 1 - src/pages/settings/Profile/CustomStatus/StatusPage.tsx | 1 - src/pages/settings/Profile/DisplayNamePage.tsx | 1 - .../settings/Profile/PersonalDetails/DateOfBirthPage.tsx | 5 +---- src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx | 1 - .../settings/Profile/PersonalDetails/PhoneNumberPage.tsx | 1 - src/pages/settings/Report/RoomNamePage.tsx | 1 - src/pages/settings/Security/CloseAccountPage.tsx | 5 +---- .../Subscription/DisableAutoRenewSurveyPage/index.native.tsx | 1 - .../PaymentCard/ChangeBillingCurrency/index.native.tsx | 1 - src/pages/settings/Subscription/PaymentCard/index.native.tsx | 1 - .../RequestEarlyCancellationPage/index.native.tsx | 1 - .../settings/Subscription/SubscriptionSize/index.native.tsx | 1 - src/pages/settings/Wallet/ReportCardLostPage.tsx | 5 +---- .../Wallet/ReportVirtualCardFraudConfirmationPage.tsx | 1 - src/pages/settings/Wallet/VerifyAccountPage.tsx | 5 +---- src/pages/tasks/NewTaskDescriptionPage.tsx | 1 - src/pages/tasks/NewTaskDetailsPage.tsx | 1 - src/pages/tasks/NewTaskTitlePage.tsx | 1 - src/pages/tasks/TaskDescriptionPage.tsx | 1 - src/pages/tasks/TaskTitlePage.tsx | 1 - src/pages/workspace/WorkspaceConfirmationPage.tsx | 1 - src/pages/workspace/WorkspaceInvitePage.tsx | 1 - src/pages/workspace/WorkspaceNamePage.tsx | 1 - src/pages/workspace/WorkspaceNewRoomPage.tsx | 1 - src/pages/workspace/WorkspaceProfileDescriptionPage.tsx | 1 - .../accounting/intacct/EnterSageIntacctCredentialsPage.tsx | 1 - src/pages/workspace/accounting/nsqs/NSQSSetupPage.tsx | 1 - .../workspace/categories/CategoryDescriptionHintPage.tsx | 1 - .../workspace/categories/CategoryFlagAmountsOverPage.tsx | 1 - src/pages/workspace/categories/CategoryGLCodePage.tsx | 1 - src/pages/workspace/categories/CategoryPayrollCodePage.tsx | 1 - src/pages/workspace/categories/CreateCategoryPage.tsx | 1 - src/pages/workspace/categories/EditCategoryPage.tsx | 1 - src/pages/workspace/categories/ImportedCategoriesPage.tsx | 5 +---- .../workspace/companyCards/WorkspaceCompanyCardsPage.tsx | 1 - .../WorkspaceCompanyCardsSettingsFeedNamePage.tsx | 1 - src/pages/workspace/companyCards/addNew/CardNameStep.tsx | 1 - src/pages/workspace/companyCards/addNew/DetailsStep.tsx | 1 - src/pages/workspace/companyCards/assignCard/CardNameStep.tsx | 1 - src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx | 1 - .../workspace/distanceRates/PolicyDistanceRateEditPage.tsx | 1 - .../PolicyDistanceRateTaxReclaimableEditPage.tsx | 1 - src/pages/workspace/members/ImportedMembersPage.tsx | 5 +---- src/pages/workspace/perDiem/EditPerDiemAmountPage.tsx | 1 - src/pages/workspace/perDiem/EditPerDiemCurrencyPage.tsx | 5 +---- src/pages/workspace/perDiem/EditPerDiemDestinationPage.tsx | 1 - src/pages/workspace/perDiem/EditPerDiemSubratePage.tsx | 1 - src/pages/workspace/perDiem/ImportedPerDiemPage.tsx | 5 +---- src/pages/workspace/reportFields/CreateReportFieldsPage.tsx | 1 - .../workspace/reportFields/ReportFieldsAddListValuePage.tsx | 1 - .../workspace/reportFields/ReportFieldsEditValuePage.tsx | 1 - .../workspace/reportFields/ReportFieldsInitialValuePage.tsx | 1 - src/pages/workspace/rules/PolicyRulesPage.tsx | 1 - .../workspace/rules/RulesAutoApproveReportsUnderPage.tsx | 1 - src/pages/workspace/rules/RulesAutoPayReportsUnderPage.tsx | 1 - src/pages/workspace/rules/RulesCustomNamePage.tsx | 1 - src/pages/workspace/rules/RulesCustomPage.tsx | 1 - src/pages/workspace/rules/RulesMaxExpenseAgePage.tsx | 1 - src/pages/workspace/rules/RulesMaxExpenseAmountPage.tsx | 1 - src/pages/workspace/rules/RulesRandomReportAuditPage.tsx | 1 - src/pages/workspace/rules/RulesReceiptRequiredAmountPage.tsx | 1 - src/pages/workspace/tags/EditTagPage.tsx | 1 - src/pages/workspace/tags/ImportedTagsPage.tsx | 5 +---- src/pages/workspace/tags/TagGLCodePage.tsx | 1 - src/pages/workspace/tags/WorkspaceCreateTagPage.tsx | 1 - src/pages/workspace/tags/WorkspaceEditTagsPage.tsx | 1 - src/pages/workspace/taxes/NamePage.tsx | 1 - src/pages/workspace/taxes/ValuePage.tsx | 1 - src/pages/workspace/taxes/WorkspaceTaxCodePage.tsx | 1 - .../workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx | 1 - src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx | 1 - .../approvals/WorkspaceWorkflowsApprovalsCreatePage.tsx | 5 +---- .../approvals/WorkspaceWorkflowsApprovalsEditPage.tsx | 5 +---- 122 files changed, 20 insertions(+), 180 deletions(-) diff --git a/src/components/CategorySelector/CategorySelectorModal.tsx b/src/components/CategorySelector/CategorySelectorModal.tsx index f12a52dbb3145..1b619b05cb5f9 100644 --- a/src/components/CategorySelector/CategorySelectorModal.tsx +++ b/src/components/CategorySelector/CategorySelectorModal.tsx @@ -42,7 +42,6 @@ function CategorySelectorModal({policyID, isVisible, currentCategory, onCategory diff --git a/src/components/DatePicker/CalendarPicker/YearPickerModal.tsx b/src/components/DatePicker/CalendarPicker/YearPickerModal.tsx index 716bc90c6adf3..b5712fe45e290 100644 --- a/src/components/DatePicker/CalendarPicker/YearPickerModal.tsx +++ b/src/components/DatePicker/CalendarPicker/YearPickerModal.tsx @@ -58,7 +58,6 @@ function YearPickerModal({isVisible, years, currentYear = new Date().getFullYear diff --git a/src/components/Search/SearchDateFilterBase.tsx b/src/components/Search/SearchDateFilterBase.tsx index 483a1ccc0c9f7..938880a14651f 100644 --- a/src/components/Search/SearchDateFilterBase.tsx +++ b/src/components/Search/SearchDateFilterBase.tsx @@ -45,7 +45,6 @@ function SearchDateFilterBase({dateKey, titleKey}: SearchDateFilterBaseProps) { testID={SearchDateFilterBase.displayName} shouldShowOfflineIndicatorInWideScreen offlineIndicatorStyle={styles.mtAuto} - includeSafeAreaPaddingBottom shouldEnableMaxHeight > diff --git a/src/components/TimeModalPicker.tsx b/src/components/TimeModalPicker.tsx index 177ea8a5a3e35..54d9c57d0e92a 100644 --- a/src/components/TimeModalPicker.tsx +++ b/src/components/TimeModalPicker.tsx @@ -59,7 +59,6 @@ function TimeModalPicker({value, errorText, label, onInputChange = () => {}}: Ti diff --git a/src/pages/AddressPage.tsx b/src/pages/AddressPage.tsx index 8e3d0d373dc2c..5dc609ff252e7 100644 --- a/src/pages/AddressPage.tsx +++ b/src/pages/AddressPage.tsx @@ -81,10 +81,7 @@ function AddressPage({title, address, updateAddress, isLoadingApp = true, backTo }, []); return ( - + diff --git a/src/pages/EnablePayments/EnablePaymentsPage.tsx b/src/pages/EnablePayments/EnablePaymentsPage.tsx index 446976f417186..a6732e590b665 100644 --- a/src/pages/EnablePayments/EnablePaymentsPage.tsx +++ b/src/pages/EnablePayments/EnablePaymentsPage.tsx @@ -54,7 +54,6 @@ function EnablePaymentsPage({userWallet}: EnablePaymentsPageProps) { return ( {() => { diff --git a/src/pages/GroupChatNameEditPage.tsx b/src/pages/GroupChatNameEditPage.tsx index 4f5336fdcad29..196a2b7cf8f48 100644 --- a/src/pages/GroupChatNameEditPage.tsx +++ b/src/pages/GroupChatNameEditPage.tsx @@ -73,7 +73,6 @@ function GroupChatNameEditPage({report}: GroupChatNameEditPageProps) { return ( diff --git a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx index 18eaeba3e3783..7462b5004ce61 100644 --- a/src/pages/PrivateNotes/PrivateNotesEditPage.tsx +++ b/src/pages/PrivateNotes/PrivateNotesEditPage.tsx @@ -105,7 +105,6 @@ function PrivateNotesEditPage({route, report, accountID}: PrivateNotesEditPagePr return ( + + + {shouldShowResetFilters && {translate('search.resetFilters')}} diff --git a/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersAmountPage.tsx b/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersAmountPage.tsx index 9133877030532..85de9dcd5af89 100644 --- a/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersAmountPage.tsx +++ b/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersAmountPage.tsx @@ -43,7 +43,6 @@ function SearchFiltersAmountPage() { testID={SearchFiltersAmountPage.displayName} shouldShowOfflineIndicatorInWideScreen offlineIndicatorStyle={styles.mtAuto} - includeSafeAreaPaddingBottom shouldEnableMaxHeight > + Navigation.goBack()} diff --git a/src/pages/TeachersUnite/KnowATeacherPage.tsx b/src/pages/TeachersUnite/KnowATeacherPage.tsx index fbfd0057059d8..b7c8b25c9f61e 100644 --- a/src/pages/TeachersUnite/KnowATeacherPage.tsx +++ b/src/pages/TeachersUnite/KnowATeacherPage.tsx @@ -80,10 +80,7 @@ function KnowATeacherPage(props: KnowATeacherPageProps) { ); return ( - + Navigation.goBack()} diff --git a/src/pages/Travel/TripDetailsPage.tsx b/src/pages/Travel/TripDetailsPage.tsx index 2e9df5a6a5e68..3ae73b6867a3c 100644 --- a/src/pages/Travel/TripDetailsPage.tsx +++ b/src/pages/Travel/TripDetailsPage.tsx @@ -59,7 +59,6 @@ function TripDetailsPage({route}: TripDetailsPageProps) { return ( {({didScreenTransitionEnd}) => ( diff --git a/src/pages/iou/HoldReasonFormView.tsx b/src/pages/iou/HoldReasonFormView.tsx index a9e93abb649aa..a6d9c7a755a69 100644 --- a/src/pages/iou/HoldReasonFormView.tsx +++ b/src/pages/iou/HoldReasonFormView.tsx @@ -33,7 +33,6 @@ function HoldReasonFormView({backTo, validate, onSubmit}: HoldReasonFormViewProp return ( diff --git a/src/pages/iou/request/step/IOURequestStepAmount.tsx b/src/pages/iou/request/step/IOURequestStepAmount.tsx index d4595659bd10d..e4110d0347ceb 100644 --- a/src/pages/iou/request/step/IOURequestStepAmount.tsx +++ b/src/pages/iou/request/step/IOURequestStepAmount.tsx @@ -311,7 +311,6 @@ function IOURequestStepAmount({ onBackButtonPress={navigateBack} testID={IOURequestStepAmount.displayName} shouldShowWrapper={!!backTo || isEditing} - includeSafeAreaPaddingBottom > navigateBack()} shouldShowWrapper testID={IOURequestStepCurrency.displayName} - includeSafeAreaPaddingBottom > {({didScreenTransitionEnd}) => ( diff --git a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx index b3ed65be34a6c..f71f1e31c3ae6 100644 --- a/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx +++ b/src/pages/iou/request/step/IOURequestStepTaxAmountPage.tsx @@ -158,7 +158,6 @@ function IOURequestStepTaxAmountPage({ onBackButtonPress={navigateBack} testID={IOURequestStepTaxAmountPage.displayName} shouldShowWrapper={!!(backTo || isEditing)} - includeSafeAreaPaddingBottom > textInput.current?.focus()} shouldEnableMaxHeight testID={IOURequestStepWaypoint.displayName} diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx index 62e75f6895cda..b179f71157790 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx @@ -113,7 +113,6 @@ function NewContactMethodPage({route}: NewContactMethodPageProps) { return ( loginInputRef.current?.focus()} - includeSafeAreaPaddingBottom shouldEnableMaxHeight testID={NewContactMethodPage.displayName} > diff --git a/src/pages/settings/Profile/CustomStatus/SetDatePage.tsx b/src/pages/settings/Profile/CustomStatus/SetDatePage.tsx index 51dddadbc8d15..9683ca9d52b75 100644 --- a/src/pages/settings/Profile/CustomStatus/SetDatePage.tsx +++ b/src/pages/settings/Profile/CustomStatus/SetDatePage.tsx @@ -50,10 +50,7 @@ function SetDatePage({customStatus}: SetDatePageProps) { }, []); return ( - + Navigation.goBack(ROUTES.SETTINGS_STATUS_CLEAR_AFTER)} diff --git a/src/pages/settings/Profile/CustomStatus/SetTimePage.tsx b/src/pages/settings/Profile/CustomStatus/SetTimePage.tsx index 101f7269616d3..8e7ca92f76865 100644 --- a/src/pages/settings/Profile/CustomStatus/SetTimePage.tsx +++ b/src/pages/settings/Profile/CustomStatus/SetTimePage.tsx @@ -33,10 +33,7 @@ function SetTimePage({customStatus}: SetTimePageProps) { }; return ( - + Navigation.goBack(ROUTES.SETTINGS_STATUS_CLEAR_AFTER)} diff --git a/src/pages/settings/Profile/CustomStatus/StatusClearAfterPage.tsx b/src/pages/settings/Profile/CustomStatus/StatusClearAfterPage.tsx index 55c0100a84dba..70508553f8d66 100644 --- a/src/pages/settings/Profile/CustomStatus/StatusClearAfterPage.tsx +++ b/src/pages/settings/Profile/CustomStatus/StatusClearAfterPage.tsx @@ -162,7 +162,6 @@ function StatusClearAfterPage() { return ( diff --git a/src/pages/settings/Profile/CustomStatus/StatusPage.tsx b/src/pages/settings/Profile/CustomStatus/StatusPage.tsx index e99307897315e..115e05dff1ec9 100644 --- a/src/pages/settings/Profile/CustomStatus/StatusPage.tsx +++ b/src/pages/settings/Profile/CustomStatus/StatusPage.tsx @@ -156,7 +156,6 @@ function StatusPage() { diff --git a/src/pages/settings/Profile/PersonalDetails/DateOfBirthPage.tsx b/src/pages/settings/Profile/PersonalDetails/DateOfBirthPage.tsx index 0d400211cc4ca..e537c44e68f90 100644 --- a/src/pages/settings/Profile/PersonalDetails/DateOfBirthPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/DateOfBirthPage.tsx @@ -42,10 +42,7 @@ function DateOfBirthPage() { }, []); return ( - + diff --git a/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx b/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx index 15704221f2593..a67614e4bec4b 100644 --- a/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/PhoneNumberPage.tsx @@ -72,7 +72,6 @@ function PhoneNumberPage() { return ( diff --git a/src/pages/settings/Report/RoomNamePage.tsx b/src/pages/settings/Report/RoomNamePage.tsx index d7ad1c51f22c8..8d8e1a17fab61 100644 --- a/src/pages/settings/Report/RoomNamePage.tsx +++ b/src/pages/settings/Report/RoomNamePage.tsx @@ -84,7 +84,6 @@ function RoomNamePage({report}: RoomNamePageProps) { return ( roomNameInputRef.current?.focus()} - includeSafeAreaPaddingBottom testID={RoomNamePage.displayName} > diff --git a/src/pages/settings/Security/CloseAccountPage.tsx b/src/pages/settings/Security/CloseAccountPage.tsx index e5fd7dd36ebf0..7901c69ef55ce 100644 --- a/src/pages/settings/Security/CloseAccountPage.tsx +++ b/src/pages/settings/Security/CloseAccountPage.tsx @@ -71,10 +71,7 @@ function CloseAccountPage() { const userEmailOrPhone = session?.email ? formatPhoneNumber(session.email) : null; return ( - + diff --git a/src/pages/settings/Subscription/PaymentCard/ChangeBillingCurrency/index.native.tsx b/src/pages/settings/Subscription/PaymentCard/ChangeBillingCurrency/index.native.tsx index b7b34d3d4ce9e..85ab09669b3be 100644 --- a/src/pages/settings/Subscription/PaymentCard/ChangeBillingCurrency/index.native.tsx +++ b/src/pages/settings/Subscription/PaymentCard/ChangeBillingCurrency/index.native.tsx @@ -6,7 +6,6 @@ function ChangeBillingCurrency() { return ( diff --git a/src/pages/settings/Subscription/PaymentCard/index.native.tsx b/src/pages/settings/Subscription/PaymentCard/index.native.tsx index bcb1b8b715aeb..4f8c76f30f918 100644 --- a/src/pages/settings/Subscription/PaymentCard/index.native.tsx +++ b/src/pages/settings/Subscription/PaymentCard/index.native.tsx @@ -6,7 +6,6 @@ function AddPaymentCard() { return ( diff --git a/src/pages/settings/Subscription/RequestEarlyCancellationPage/index.native.tsx b/src/pages/settings/Subscription/RequestEarlyCancellationPage/index.native.tsx index 10bf7808e2b13..0d0bf04ca53cc 100644 --- a/src/pages/settings/Subscription/RequestEarlyCancellationPage/index.native.tsx +++ b/src/pages/settings/Subscription/RequestEarlyCancellationPage/index.native.tsx @@ -6,7 +6,6 @@ function RequestEarlyCancellationPage() { return ( diff --git a/src/pages/settings/Subscription/SubscriptionSize/index.native.tsx b/src/pages/settings/Subscription/SubscriptionSize/index.native.tsx index 3afd512985519..c63726cc48f9c 100644 --- a/src/pages/settings/Subscription/SubscriptionSize/index.native.tsx +++ b/src/pages/settings/Subscription/SubscriptionSize/index.native.tsx @@ -6,7 +6,6 @@ function SubscriptionSizePage() { return ( diff --git a/src/pages/settings/Wallet/ReportCardLostPage.tsx b/src/pages/settings/Wallet/ReportCardLostPage.tsx index 52e5024209d4a..f1b07b9ec5296 100644 --- a/src/pages/settings/Wallet/ReportCardLostPage.tsx +++ b/src/pages/settings/Wallet/ReportCardLostPage.tsx @@ -160,10 +160,7 @@ function ReportCardLostPage({ const isDamaged = reason?.key === OPTIONS_KEYS.DAMAGED; return ( - + + Navigation.goBack(backTo)} diff --git a/src/pages/tasks/NewTaskDescriptionPage.tsx b/src/pages/tasks/NewTaskDescriptionPage.tsx index e70b6ea15d208..6d114372fcc20 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.tsx +++ b/src/pages/tasks/NewTaskDescriptionPage.tsx @@ -57,7 +57,6 @@ function NewTaskDescriptionPage({task, route}: NewTaskDescriptionPageProps) { return ( diff --git a/src/pages/tasks/NewTaskDetailsPage.tsx b/src/pages/tasks/NewTaskDetailsPage.tsx index f225727f10c38..6fc35a35bb35c 100644 --- a/src/pages/tasks/NewTaskDetailsPage.tsx +++ b/src/pages/tasks/NewTaskDetailsPage.tsx @@ -84,7 +84,6 @@ function NewTaskDetailsPage({task, route}: NewTaskDetailsPageProps) { return ( diff --git a/src/pages/tasks/NewTaskTitlePage.tsx b/src/pages/tasks/NewTaskTitlePage.tsx index 88a44aca8501c..45c6740c7b0f1 100644 --- a/src/pages/tasks/NewTaskTitlePage.tsx +++ b/src/pages/tasks/NewTaskTitlePage.tsx @@ -58,7 +58,6 @@ function NewTaskTitlePage({task, route}: NewTaskTitlePageProps) { return ( diff --git a/src/pages/tasks/TaskDescriptionPage.tsx b/src/pages/tasks/TaskDescriptionPage.tsx index 9fdf1757ca96f..445b4276faaba 100644 --- a/src/pages/tasks/TaskDescriptionPage.tsx +++ b/src/pages/tasks/TaskDescriptionPage.tsx @@ -94,7 +94,6 @@ function TaskDescriptionPage({report, currentUserPersonalDetails}: TaskDescripti return ( diff --git a/src/pages/tasks/TaskTitlePage.tsx b/src/pages/tasks/TaskTitlePage.tsx index d767b5b9da3c7..4f6a8a4ae1e53 100644 --- a/src/pages/tasks/TaskTitlePage.tsx +++ b/src/pages/tasks/TaskTitlePage.tsx @@ -75,7 +75,6 @@ function TaskTitlePage({report, currentUserPersonalDetails}: TaskTitlePageProps) return ( { inputRef?.current?.focus(); }} diff --git a/src/pages/workspace/WorkspaceConfirmationPage.tsx b/src/pages/workspace/WorkspaceConfirmationPage.tsx index ea3638b0c84d9..94d0503941fdf 100644 --- a/src/pages/workspace/WorkspaceConfirmationPage.tsx +++ b/src/pages/workspace/WorkspaceConfirmationPage.tsx @@ -26,7 +26,6 @@ function WorkspaceConfirmationPage() { return ( diff --git a/src/pages/workspace/WorkspaceInvitePage.tsx b/src/pages/workspace/WorkspaceInvitePage.tsx index eb81f9cf5d334..e55726cddcc01 100644 --- a/src/pages/workspace/WorkspaceInvitePage.tsx +++ b/src/pages/workspace/WorkspaceInvitePage.tsx @@ -307,7 +307,6 @@ function WorkspaceInvitePage({route, policy}: WorkspaceInvitePageProps) { shouldEnableMaxHeight shouldUseCachedViewportHeight testID={WorkspaceInvitePage.displayName} - includeSafeAreaPaddingBottom onEntryTransitionEnd={() => setDidScreenTransitionEnd(true)} > diff --git a/src/pages/workspace/WorkspaceNewRoomPage.tsx b/src/pages/workspace/WorkspaceNewRoomPage.tsx index 000f61510acd5..dbabeb90326b3 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.tsx +++ b/src/pages/workspace/WorkspaceNewRoomPage.tsx @@ -237,7 +237,6 @@ function WorkspaceNewRoomPage() { return ( diff --git a/src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx b/src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx index 7ac4329c3a503..2270651ab6fec 100644 --- a/src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx +++ b/src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx @@ -53,7 +53,6 @@ function EnterSageIntacctCredentialsPage({route}: SageIntacctPrerequisitesPagePr ); return ( diff --git a/src/pages/workspace/accounting/nsqs/NSQSSetupPage.tsx b/src/pages/workspace/accounting/nsqs/NSQSSetupPage.tsx index f3b578b6e064b..a8e8aa33fa694 100644 --- a/src/pages/workspace/accounting/nsqs/NSQSSetupPage.tsx +++ b/src/pages/workspace/accounting/nsqs/NSQSSetupPage.tsx @@ -69,7 +69,6 @@ function NSQSSetupPage({policy}: WithPolicyConnectionsProps) { return ( diff --git a/src/pages/workspace/categories/CategoryDescriptionHintPage.tsx b/src/pages/workspace/categories/CategoryDescriptionHintPage.tsx index e33719596feda..8e458842efa61 100644 --- a/src/pages/workspace/categories/CategoryDescriptionHintPage.tsx +++ b/src/pages/workspace/categories/CategoryDescriptionHintPage.tsx @@ -43,7 +43,6 @@ function CategoryDescriptionHintPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_CATEGORIES_ENABLED} > + diff --git a/src/pages/workspace/companyCards/WorkspaceCompanyCardsPage.tsx b/src/pages/workspace/companyCards/WorkspaceCompanyCardsPage.tsx index 44311f64944fd..e8ccb45fb9cdd 100644 --- a/src/pages/workspace/companyCards/WorkspaceCompanyCardsPage.tsx +++ b/src/pages/workspace/companyCards/WorkspaceCompanyCardsPage.tsx @@ -145,7 +145,6 @@ function WorkspaceCompanyCardPage({route}: WorkspaceCompanyCardPageProps) { route={route} guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_COMPANY_CARDS} shouldShowOfflineIndicatorInWideScreen - includeSafeAreaPaddingBottom showLoadingAsFirstRender={false} > {(isFeedAdded || isPending) && !!selectedFeed && ( diff --git a/src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsFeedNamePage.tsx b/src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsFeedNamePage.tsx index 4c2d9c3657a0e..209f92bcc467a 100644 --- a/src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsFeedNamePage.tsx +++ b/src/pages/workspace/companyCards/WorkspaceCompanyCardsSettingsFeedNamePage.tsx @@ -77,7 +77,6 @@ function WorkspaceCompanyCardsSettingsFeedNamePage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_COMPANY_CARDS_ENABLED} > diff --git a/src/pages/workspace/companyCards/addNew/DetailsStep.tsx b/src/pages/workspace/companyCards/addNew/DetailsStep.tsx index c78b15244a2a3..b7e587f7f1e94 100644 --- a/src/pages/workspace/companyCards/addNew/DetailsStep.tsx +++ b/src/pages/workspace/companyCards/addNew/DetailsStep.tsx @@ -169,7 +169,6 @@ function DetailsStep({policyID}: DetailsStepProps) { return ( diff --git a/src/pages/workspace/companyCards/assignCard/CardNameStep.tsx b/src/pages/workspace/companyCards/assignCard/CardNameStep.tsx index 8bc88744e5b81..d85660cd06815 100644 --- a/src/pages/workspace/companyCards/assignCard/CardNameStep.tsx +++ b/src/pages/workspace/companyCards/assignCard/CardNameStep.tsx @@ -60,7 +60,6 @@ function CardNameStep({policyID}: CardNameStepProps) { + Navigation.goBack(ROUTES.WORKSPACE_MEMBERS_IMPORT.getRoute(policyID))} diff --git a/src/pages/workspace/perDiem/EditPerDiemAmountPage.tsx b/src/pages/workspace/perDiem/EditPerDiemAmountPage.tsx index 84667e2151ffa..a4cb9f9e6a44f 100644 --- a/src/pages/workspace/perDiem/EditPerDiemAmountPage.tsx +++ b/src/pages/workspace/perDiem/EditPerDiemAmountPage.tsx @@ -77,7 +77,6 @@ function EditPerDiemAmountPage({route}: EditPerDiemAmountPageProps) { shouldBeBlocked={!policyID || !rateID || isEmptyObject(selectedRate) || isEmptyObject(selectedSubrate)} > - + Navigation.goBack(ROUTES.WORKSPACE_PER_DIEM_DETAILS.getRoute(policyID, rateID, subRateID))} diff --git a/src/pages/workspace/perDiem/EditPerDiemDestinationPage.tsx b/src/pages/workspace/perDiem/EditPerDiemDestinationPage.tsx index ccf8d635c1d42..df7622e4b16f5 100644 --- a/src/pages/workspace/perDiem/EditPerDiemDestinationPage.tsx +++ b/src/pages/workspace/perDiem/EditPerDiemDestinationPage.tsx @@ -72,7 +72,6 @@ function EditPerDiemDestinationPage({route}: EditPerDiemDestinationPageProps) { shouldBeBlocked={!policyID || !rateID || isEmptyObject(selectedRate)} > + Navigation.goBack(ROUTES.WORKSPACE_PER_DIEM_IMPORT.getRoute(policyID))} diff --git a/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx b/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx index b3ae0aae6a186..fa59da1992f77 100644 --- a/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx +++ b/src/pages/workspace/reportFields/CreateReportFieldsPage.tsx @@ -102,7 +102,6 @@ function CreateReportFieldsPage({ shouldBeBlocked={PolicyUtils.hasAccountingConnections(policy)} > diff --git a/src/pages/workspace/rules/RulesAutoApproveReportsUnderPage.tsx b/src/pages/workspace/rules/RulesAutoApproveReportsUnderPage.tsx index b256cf92c1d48..2760a06f75940 100644 --- a/src/pages/workspace/rules/RulesAutoApproveReportsUnderPage.tsx +++ b/src/pages/workspace/rules/RulesAutoApproveReportsUnderPage.tsx @@ -43,7 +43,6 @@ function RulesAutoApproveReportsUnderPage({route}: RulesAutoApproveReportsUnderP shouldBeBlocked={!policy?.shouldShowAutoApprovalOptions || workflowApprovalsUnavailable} > diff --git a/src/pages/workspace/rules/RulesAutoPayReportsUnderPage.tsx b/src/pages/workspace/rules/RulesAutoPayReportsUnderPage.tsx index 053cf296b7d5e..d5fef2825785a 100644 --- a/src/pages/workspace/rules/RulesAutoPayReportsUnderPage.tsx +++ b/src/pages/workspace/rules/RulesAutoPayReportsUnderPage.tsx @@ -52,7 +52,6 @@ function RulesAutoPayReportsUnderPage({route}: RulesAutoPayReportsUnderPageProps shouldBeBlocked={!policy?.shouldShowAutoReimbursementLimitOption || autoPayApprovedReportsUnavailable} > diff --git a/src/pages/workspace/rules/RulesCustomNamePage.tsx b/src/pages/workspace/rules/RulesCustomNamePage.tsx index c58b1ea2e96c1..1b71eaab2f4b9 100644 --- a/src/pages/workspace/rules/RulesCustomNamePage.tsx +++ b/src/pages/workspace/rules/RulesCustomNamePage.tsx @@ -58,7 +58,6 @@ function RulesCustomNamePage({route}: RulesCustomNamePageProps) { shouldBeBlocked={!policy?.shouldShowCustomReportTitleOption} > diff --git a/src/pages/workspace/rules/RulesCustomPage.tsx b/src/pages/workspace/rules/RulesCustomPage.tsx index 20b3edc8b6f17..090d1d1a98a8c 100644 --- a/src/pages/workspace/rules/RulesCustomPage.tsx +++ b/src/pages/workspace/rules/RulesCustomPage.tsx @@ -47,7 +47,6 @@ function RulesCustomPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED} > diff --git a/src/pages/workspace/rules/RulesMaxExpenseAgePage.tsx b/src/pages/workspace/rules/RulesMaxExpenseAgePage.tsx index 06f97a2f554dc..b3b13104b028f 100644 --- a/src/pages/workspace/rules/RulesMaxExpenseAgePage.tsx +++ b/src/pages/workspace/rules/RulesMaxExpenseAgePage.tsx @@ -51,7 +51,6 @@ function RulesMaxExpenseAgePage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED} > diff --git a/src/pages/workspace/rules/RulesMaxExpenseAmountPage.tsx b/src/pages/workspace/rules/RulesMaxExpenseAmountPage.tsx index e2eb6ccc57917..58286fc9ff347 100644 --- a/src/pages/workspace/rules/RulesMaxExpenseAmountPage.tsx +++ b/src/pages/workspace/rules/RulesMaxExpenseAmountPage.tsx @@ -46,7 +46,6 @@ function RulesMaxExpenseAmountPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED} > diff --git a/src/pages/workspace/rules/RulesRandomReportAuditPage.tsx b/src/pages/workspace/rules/RulesRandomReportAuditPage.tsx index 409b07c8582af..27754296ecb2c 100644 --- a/src/pages/workspace/rules/RulesRandomReportAuditPage.tsx +++ b/src/pages/workspace/rules/RulesRandomReportAuditPage.tsx @@ -41,7 +41,6 @@ function RulesRandomReportAuditPage({route}: RulesRandomReportAuditPageProps) { shouldBeBlocked={!policy?.shouldShowAutoApprovalOptions || workflowApprovalsUnavailable} > diff --git a/src/pages/workspace/rules/RulesReceiptRequiredAmountPage.tsx b/src/pages/workspace/rules/RulesReceiptRequiredAmountPage.tsx index 646722e44d9d4..36e73915d0ddd 100644 --- a/src/pages/workspace/rules/RulesReceiptRequiredAmountPage.tsx +++ b/src/pages/workspace/rules/RulesReceiptRequiredAmountPage.tsx @@ -46,7 +46,6 @@ function RulesReceiptRequiredAmountPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED} > diff --git a/src/pages/workspace/tags/EditTagPage.tsx b/src/pages/workspace/tags/EditTagPage.tsx index dbf60f2452433..8443da4a0a37a 100644 --- a/src/pages/workspace/tags/EditTagPage.tsx +++ b/src/pages/workspace/tags/EditTagPage.tsx @@ -77,7 +77,6 @@ function EditTagPage({route}: EditTagPageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_TAGS_ENABLED} > + Navigation.goBack(isQuickSettingsFlow ? ROUTES.SETTINGS_TAGS_IMPORT.getRoute(policyID, backTo) : ROUTES.WORKSPACE_TAGS_IMPORT.getRoute(policyID))} diff --git a/src/pages/workspace/tags/TagGLCodePage.tsx b/src/pages/workspace/tags/TagGLCodePage.tsx index f6227619b7125..c58151f1dddf2 100644 --- a/src/pages/workspace/tags/TagGLCodePage.tsx +++ b/src/pages/workspace/tags/TagGLCodePage.tsx @@ -65,7 +65,6 @@ function TagGLCodePage({route}: EditTagGLCodePageProps) { shouldBeBlocked={PolicyUtils.hasAccountingConnections(policy)} > diff --git a/src/pages/workspace/taxes/NamePage.tsx b/src/pages/workspace/taxes/NamePage.tsx index d886cc31b82b6..4981ca8353bb2 100644 --- a/src/pages/workspace/taxes/NamePage.tsx +++ b/src/pages/workspace/taxes/NamePage.tsx @@ -74,7 +74,6 @@ function NamePage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_TAXES_ENABLED} > diff --git a/src/pages/workspace/taxes/ValuePage.tsx b/src/pages/workspace/taxes/ValuePage.tsx index 8369e9c350183..2d413da4ba57e 100644 --- a/src/pages/workspace/taxes/ValuePage.tsx +++ b/src/pages/workspace/taxes/ValuePage.tsx @@ -63,7 +63,6 @@ function ValuePage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_TAXES_ENABLED} > diff --git a/src/pages/workspace/taxes/WorkspaceTaxCodePage.tsx b/src/pages/workspace/taxes/WorkspaceTaxCodePage.tsx index 04775ed67c16f..6f01cdcd94636 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxCodePage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxCodePage.tsx @@ -68,7 +68,6 @@ function WorkspaceTaxCodePage({route}: WorkspaceTaxCodePageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_TAXES_ENABLED} > diff --git a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx index b7927692f4f31..ad1045af40d06 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesSettingsCustomTaxName.tsx @@ -63,7 +63,6 @@ function WorkspaceTaxesSettingsCustomTaxName({ featureName={CONST.POLICY.MORE_FEATURES.ARE_TAXES_ENABLED} > {optionItems.map(renderOptionItem)} diff --git a/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsCreatePage.tsx b/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsCreatePage.tsx index 418e2ec6a2224..7510f62383145 100644 --- a/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsCreatePage.tsx +++ b/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsCreatePage.tsx @@ -54,10 +54,7 @@ function WorkspaceWorkflowsApprovalsCreatePage({policy, isLoadingReportData = tr policyID={route.params.policyID} featureName={CONST.POLICY.MORE_FEATURES.ARE_WORKFLOWS_ENABLED} > - + - + Date: Wed, 19 Feb 2025 08:59:31 +0100 Subject: [PATCH 18/18] fix: syntax and eslint error in ScreenWrapper --- src/components/ScreenWrapper.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/components/ScreenWrapper.tsx b/src/components/ScreenWrapper.tsx index 079fdf3eb9bb0..7c0de60039660 100644 --- a/src/components/ScreenWrapper.tsx +++ b/src/components/ScreenWrapper.tsx @@ -262,7 +262,7 @@ function ScreenWrapper( // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps }, []); - const {insets, paddingTop, paddingBottom, safeAreaPaddingBottomStyle, unmodifiedPaddings} = useStyledSafeAreaInsets(); + const {insets, paddingTop, safeAreaPaddingBottomStyle, unmodifiedPaddings} = useStyledSafeAreaInsets(); const paddingTopStyle: StyleProp = {}; const isSafeAreaTopPaddingApplied = includePaddingTop; @@ -273,11 +273,11 @@ function ScreenWrapper( paddingTopStyle.paddingTop = unmodifiedPaddings.top; } - const bottomContentStyle: StyleProp = safeAreaPaddingBottomStyle; - // We always need the safe area padding bottom if we're showing the offline indicator since it is bottom-docked. - if (includeSafeAreaPaddingBottom && ignoreInsetsConsumption) { - bottomContentStyle.paddingBottom = unmodifiedPaddings.bottom; - } + const bottomContentStyle: StyleProp = { + ...safeAreaPaddingBottomStyle, + // We always need the safe area padding bottom if we're showing the offline indicator since it is bottom-docked. + ...(includeSafeAreaPaddingBottom && ignoreInsetsConsumption ? {paddingBottom: unmodifiedPaddings.bottom} : {}), + }; const isAvoidingViewportScroll = useTackInputFocus(isFocused && shouldEnableMaxHeight && shouldAvoidScrollOnVirtualViewport && isMobileWebKit()); const contextValue = useMemo( @@ -326,10 +326,7 @@ function ScreenWrapper( <> {/* Since import state is tightly coupled to the offline state, it is safe to display it when showing offline indicator */} @@ -349,7 +346,7 @@ function ScreenWrapper( - {bottomContent && {bottomContent}} + {!!bottomContent && {bottomContent}} );