diff --git a/src/CONST.ts b/src/CONST.ts index e05a8bd1a0149..87287d582439d 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1443,6 +1443,20 @@ const CONST = { LIGHT: 'light', DARK: 'dark', }, + NAVIGATION_BAR_TYPE: { + // 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). + // 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. (Samsung & Huawei: ~14-15dpi) + NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD: 30, TRANSACTION: { DEFAULT_MERCHANT: 'Expense', UNKNOWN_MERCHANT: 'Unknown Merchant', 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 ({measureParentContainerAndReportCu const StyleUtils = useStyleUtils(); const insets = useSafeAreaInsets(); const {keyboardHeight, isKeyboardAnimatingRef} = 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/AvatarCropModal/AvatarCropModal.tsx b/src/components/AvatarCropModal/AvatarCropModal.tsx index 3ff9ccc4e3f82..05e373d07de17 100644 --- a/src/components/AvatarCropModal/AvatarCropModal.tsx +++ b/src/components/AvatarCropModal/AvatarCropModal.tsx @@ -354,7 +354,6 @@ function AvatarCropModal({imageUri = '', imageName = '', imageType = '', onClose {shouldUseNarrowLayout && } 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/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 styles.growlNotificationTranslateY(translateY)); - return {children}; + return {children}; } GrowlNotificationContainer.displayName = 'GrowlNotificationContainer'; diff --git a/src/components/HeaderPageLayout.tsx b/src/components/HeaderPageLayout.tsx index 1d3a290ccbff8..197e74035b139 100644 --- a/src/components/HeaderPageLayout.tsx +++ b/src/components/HeaderPageLayout.tsx @@ -80,7 +80,6 @@ function HeaderPageLayout({ StyleUtils.getSafeAreaPadding(insets), [StyleUtils, insets]); + } = useMemo(() => StyleUtils.getPlatformSafeAreaPadding(insets), [StyleUtils, insets]); const modalPaddingStyles = useMemo( () => diff --git a/src/components/PushRowWithModal/PushRowModal.tsx b/src/components/PushRowWithModal/PushRowModal.tsx index d2c6d950c7ee7..06db5f97d554a 100644 --- a/src/components/PushRowWithModal/PushRowModal.tsx +++ b/src/components/PushRowWithModal/PushRowModal.tsx @@ -81,7 +81,6 @@ function PushRowModal({isVisible, selectedOption, onOptionChange, onClose, optio > {(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/components/ScreenWrapper.tsx b/src/components/ScreenWrapper.tsx index ee543765169df..7c0de60039660 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, @@ -261,9 +262,8 @@ 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 paddingBottomStyle: StyleProp = {}; const isSafeAreaTopPaddingApplied = includePaddingTop; if (includePaddingTop) { @@ -273,18 +273,16 @@ function ScreenWrapper( paddingTopStyle.paddingTop = unmodifiedPaddings.top; } - // 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; - } + 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( () => ({didScreenTransitionEnd, isSafeAreaTopPaddingApplied, isSafeAreaBottomPaddingApplied: includeSafeAreaPaddingBottom}), - [didScreenTransitionEnd, includeSafeAreaPaddingBottom, isSafeAreaTopPaddingApplied], + [didScreenTransitionEnd, isSafeAreaTopPaddingApplied], ); return ( @@ -328,11 +326,7 @@ function ScreenWrapper( <> {/* Since import state is tightly coupled to the offline state, it is safe to display it when showing offline indicator */} @@ -352,7 +346,7 @@ function ScreenWrapper( - {bottomContent} + {!!bottomContent && {bottomContent}} ); 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/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, diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 5798f45dde728..9c9aba4b7001e 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -1133,11 +1133,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 | undefined) { const policy = getPolicy(policyID); if (!policy) { - return 0; + return CONST.DEFAULT_NUMBER_ID; } return policy.workspaceAccountID ?? CONST.DEFAULT_NUMBER_ID; } 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 ( - + @@ -95,7 +94,6 @@ function EditReportFieldPage({route}: EditReportFieldPageProps) { return ( diff --git a/src/pages/EnablePayments/AddBankAccount/AddBankAccount.tsx b/src/pages/EnablePayments/AddBankAccount/AddBankAccount.tsx index a273b210efa98..a9e59e04795d7 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 acbafafeea593..e11524e2ba0a9 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 ( {() => { 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/FlagCommentPage.tsx b/src/pages/FlagCommentPage.tsx index 8db5045205291..9d3d971bb6908 100644 --- a/src/pages/FlagCommentPage.tsx +++ b/src/pages/FlagCommentPage.tsx @@ -130,10 +130,7 @@ function FlagCommentPage({parentReportAction, route, report, parentReport, repor )); return ( - + {({safeAreaPaddingBottomStyle}) => ( + diff --git a/src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx b/src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx index 5103868eb04e3..ac36889fb7745 100644 --- a/src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx +++ b/src/pages/MissingPersonalDetails/MissingPersonalDetailsContent.tsx @@ -121,7 +121,6 @@ function MissingPersonalDetailsContent({privatePersonalDetails, draftValues}: Mi return ( diff --git a/src/pages/NewChatPage.tsx b/src/pages/NewChatPage.tsx index a2a47c44b2c1d..76b1a7ed0d692 100755 --- a/src/pages/NewChatPage.tsx +++ b/src/pages/NewChatPage.tsx @@ -329,7 +329,6 @@ function NewChatPage() { return ( diff --git a/src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx b/src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx index 1a4b9bd79e612..02b97ca0113d4 100644 --- a/src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx +++ b/src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx @@ -117,7 +117,6 @@ function BaseOnboardingEmployees({shouldUseNativeStyles, route}: BaseOnboardingE return ( diff --git a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx index e744d9801b283..91a556b8a998c 100644 --- a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx +++ b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx @@ -148,7 +148,6 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat 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/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 ( + + 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/ReportParticipantsPage.tsx b/src/pages/ReportParticipantsPage.tsx index bda35fc70b1f7..62440a48950c0 100755 --- a/src/pages/ReportParticipantsPage.tsx +++ b/src/pages/ReportParticipantsPage.tsx @@ -379,7 +379,6 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) { return ( diff --git a/src/pages/RestrictedAction/Workspace/WorkspaceAdminRestrictedAction.tsx b/src/pages/RestrictedAction/Workspace/WorkspaceAdminRestrictedAction.tsx index 342cd4ce5e6ea..6970d01f32dd0 100644 --- a/src/pages/RestrictedAction/Workspace/WorkspaceAdminRestrictedAction.tsx +++ b/src/pages/RestrictedAction/Workspace/WorkspaceAdminRestrictedAction.tsx @@ -31,10 +31,7 @@ function WorkspaceAdminRestrictedAction({policyID}: WorkspaceAdminRestrictedActi }, [policyID]); return ( - + + + diff --git a/src/pages/Search/SavedSearchRenamePage.tsx b/src/pages/Search/SavedSearchRenamePage.tsx index 2475c9ea602b9..b0c1b9817060b 100644 --- a/src/pages/Search/SavedSearchRenamePage.tsx +++ b/src/pages/Search/SavedSearchRenamePage.tsx @@ -50,7 +50,6 @@ function SavedSearchRenamePage({route}: {route: {params: {q: string; name: strin testID={SavedSearchRenamePage.displayName} shouldShowOfflineIndicatorInWideScreen offlineIndicatorStyle={styles.mtAuto} - includeSafeAreaPaddingBottom > {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/TeachersUnite/SaveTheWorldPage.tsx b/src/pages/TeachersUnite/SaveTheWorldPage.tsx index f52d20ad90142..6be3d59217ce0 100644 --- a/src/pages/TeachersUnite/SaveTheWorldPage.tsx +++ b/src/pages/TeachersUnite/SaveTheWorldPage.tsx @@ -49,7 +49,6 @@ function SaveTheWorldPage() { return ( 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 ( {({didScreenTransitionEnd}) => ( diff --git a/src/pages/home/sidebar/AllSettingsScreen.tsx b/src/pages/home/sidebar/AllSettingsScreen.tsx index 0025e6b429c58..8014d63c48c51 100644 --- a/src/pages/home/sidebar/AllSettingsScreen.tsx +++ b/src/pages/home/sidebar/AllSettingsScreen.tsx @@ -89,7 +89,6 @@ function AllSettingsScreen() { 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/iou/request/step/StepScreenDragAndDropWrapper.tsx b/src/pages/iou/request/step/StepScreenDragAndDropWrapper.tsx index 81a574b6e408d..99d85cf65fef5 100644 --- a/src/pages/iou/request/step/StepScreenDragAndDropWrapper.tsx +++ b/src/pages/iou/request/step/StepScreenDragAndDropWrapper.tsx @@ -39,7 +39,6 @@ function StepScreenDragAndDropWrapper({testID, headerTitle, onBackButtonPress, o return ( + {({didScreenTransitionEnd}) => ( <> } shouldEnableKeyboardAvoidingView={false} 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/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 ( + 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/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/CountrySelectionPage.tsx b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx index a6353bffb12b4..f15feb7836be0 100644 --- a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx @@ -57,10 +57,7 @@ function CountrySelectionPage({route}: CountrySelectionPageProps) { ); 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/Profile/PersonalDetails/StateSelectionPage.tsx b/src/pages/settings/Profile/PersonalDetails/StateSelectionPage.tsx index 14a3248d2c80d..219be626e05ce 100644 --- a/src/pages/settings/Profile/PersonalDetails/StateSelectionPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/StateSelectionPage.tsx @@ -67,10 +67,7 @@ function StateSelectionPage() { ); return ( - + diff --git a/src/pages/settings/Profile/PronounsPage.tsx b/src/pages/settings/Profile/PronounsPage.tsx index 7508cedbbb19b..58a656f90edc4 100644 --- a/src/pages/settings/Profile/PronounsPage.tsx +++ b/src/pages/settings/Profile/PronounsPage.tsx @@ -76,10 +76,7 @@ function PronounsPage({currentUserPersonalDetails}: PronounsPageProps) { }; 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 ( - + roomNameInputRef.current?.focus()} - includeSafeAreaPaddingBottom testID={RoomNamePage.displayName} > diff --git a/src/pages/settings/Report/VisibilityPage.tsx b/src/pages/settings/Report/VisibilityPage.tsx index 560b96383a57d..758f6f0b8c53b 100644 --- a/src/pages/settings/Report/VisibilityPage.tsx +++ b/src/pages/settings/Report/VisibilityPage.tsx @@ -68,10 +68,7 @@ function VisibilityPage({report}: VisibilityProps) { }, []); 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/DisableAutoRenewSurveyPage/index.tsx b/src/pages/settings/Subscription/DisableAutoRenewSurveyPage/index.tsx index 655658363e875..c47be38dfc4fb 100644 --- a/src/pages/settings/Subscription/DisableAutoRenewSurveyPage/index.tsx +++ b/src/pages/settings/Subscription/DisableAutoRenewSurveyPage/index.tsx @@ -22,7 +22,6 @@ function DisableAutoRenewSurveyPage() { 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/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.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/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} > + + Navigation.goBack(backTo)} diff --git a/src/pages/signin/SAMLSignInPage/index.native.tsx b/src/pages/signin/SAMLSignInPage/index.native.tsx index 3b9bc456a6807..7fa419b925a8e 100644 --- a/src/pages/signin/SAMLSignInPage/index.native.tsx +++ b/src/pages/signin/SAMLSignInPage/index.native.tsx @@ -51,7 +51,6 @@ function SAMLSignInPage() { return ( {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 ( 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/TaskAssigneeSelectorModal.tsx b/src/pages/tasks/TaskAssigneeSelectorModal.tsx index 5aaf02d8ba3e6..72c7440c65e4b 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.tsx +++ b/src/pages/tasks/TaskAssigneeSelectorModal.tsx @@ -208,10 +208,7 @@ function TaskAssigneeSelectorModal() { }, [debouncedSearchValue]); return ( - + diff --git a/src/pages/tasks/TaskShareDestinationSelectorModal.tsx b/src/pages/tasks/TaskShareDestinationSelectorModal.tsx index 85859030c4249..f2cae336f446b 100644 --- a/src/pages/tasks/TaskShareDestinationSelectorModal.tsx +++ b/src/pages/tasks/TaskShareDestinationSelectorModal.tsx @@ -117,7 +117,6 @@ function TaskShareDestinationSelectorModal() { return ( setDidScreenTransitionEnd(true)} > 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/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 ( diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index af7a1c9d91897..dffa91a1c149f 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -438,7 +438,6 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac return ( : null} > 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 ( - + Navigation.goBack()} diff --git a/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx index 54ee3c1753efd..512a7e572b689 100644 --- a/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx +++ b/src/pages/workspace/WorkspaceProfileDescriptionPage.tsx @@ -71,7 +71,6 @@ function WorkspaceProfileDescriptionPage({policy}: Props) { accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]} > diff --git a/src/pages/workspace/accounting/MultiConnectionSelectorPage.tsx b/src/pages/workspace/accounting/MultiConnectionSelectorPage.tsx index e8ecca78c7624..49855b5084e92 100644 --- a/src/pages/workspace/accounting/MultiConnectionSelectorPage.tsx +++ b/src/pages/workspace/accounting/MultiConnectionSelectorPage.tsx @@ -94,7 +94,6 @@ function MultiConnectionSelectorPage({policy, route}: MultiConnectionSelectorPag > diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index 784d21de98123..d31c3b9aecd0f 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -559,7 +559,6 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { > diff --git a/src/pages/workspace/accounting/netsuite/advanced/NetSuiteAutoSyncPage.tsx b/src/pages/workspace/accounting/netsuite/advanced/NetSuiteAutoSyncPage.tsx index 2836b3d60075a..a80f773f10d14 100644 --- a/src/pages/workspace/accounting/netsuite/advanced/NetSuiteAutoSyncPage.tsx +++ b/src/pages/workspace/accounting/netsuite/advanced/NetSuiteAutoSyncPage.tsx @@ -40,7 +40,6 @@ function NetSuiteAutoSyncPage({policy, route}: WithPolicyConnectionsProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_CATEGORIES_ENABLED} > diff --git a/src/pages/workspace/accounting/reconciliation/CardReconciliationPage.tsx b/src/pages/workspace/accounting/reconciliation/CardReconciliationPage.tsx index 19429e147426c..e8f19cf207e1a 100644 --- a/src/pages/workspace/accounting/reconciliation/CardReconciliationPage.tsx +++ b/src/pages/workspace/accounting/reconciliation/CardReconciliationPage.tsx @@ -79,7 +79,6 @@ function CardReconciliationPage({policy, route}: CardReconciliationPageProps) { shouldBeBlocked={!shouldShow} > 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/CreateCategoryPage.tsx b/src/pages/workspace/categories/CreateCategoryPage.tsx index f17804a5ddff1..eeb2693159321 100644 --- a/src/pages/workspace/categories/CreateCategoryPage.tsx +++ b/src/pages/workspace/categories/CreateCategoryPage.tsx @@ -40,7 +40,6 @@ function CreateCategoryPage({route}: CreateCategoryPageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_CATEGORIES_ENABLED} > + diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 603a6902869ee..85bbedc3d4d2f 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -379,7 +379,6 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_CATEGORIES_ENABLED} > diff --git a/src/pages/workspace/companyCards/WorkspaceCompanyCardDetailsPage.tsx b/src/pages/workspace/companyCards/WorkspaceCompanyCardDetailsPage.tsx index 4c012932546de..0cc18acca02df 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}) => ( <> {(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/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 903abeb0d22f2..38bf1c25b493d 100644 --- a/src/pages/workspace/companyCards/addNew/BankConnection/index.native.tsx +++ b/src/pages/workspace/companyCards/addNew/BankConnection/index.native.tsx @@ -89,7 +89,6 @@ function BankConnection({policyID: policyIDFromProps, route}: BankConnectionStep diff --git a/src/pages/workspace/companyCards/addNew/CardNameStep.tsx b/src/pages/workspace/companyCards/addNew/CardNameStep.tsx index b7f1c438ad6f2..8a224f74fcf98 100644 --- a/src/pages/workspace/companyCards/addNew/CardNameStep.tsx +++ b/src/pages/workspace/companyCards/addNew/CardNameStep.tsx @@ -49,7 +49,6 @@ function CardNameStep() { return ( 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/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/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/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) { diff --git a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx index 156f941804ec8..52b1dcf8faf4e 100644 --- a/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx +++ b/src/pages/workspace/distanceRates/CreateDistanceRatePage.tsx @@ -65,7 +65,6 @@ function CreateDistanceRatePage({route}: CreateDistanceRatePageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_DISTANCE_RATES_ENABLED} > diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx index 2266a2254d403..c246ff1db0c06 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRateEditPage.tsx @@ -67,7 +67,6 @@ function PolicyDistanceRateEditPage({route}: PolicyDistanceRateEditPageProps) { 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 8922052b78a0a..404048a9b6f2f 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardBankAccounts.tsx @@ -186,7 +186,6 @@ function WorkspaceExpensifyCardBankAccounts({route}: WorkspaceExpensifyCardBankA > diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx index a1bd3d2c31474..8ab417989b70e 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx @@ -91,10 +91,7 @@ function WorkspaceExpensifyCardDetailsPage({route}: WorkspaceExpensifyCardDetail policyID={policyID} featureName={CONST.POLICY.MORE_FEATURES.ARE_EXPENSIFY_CARDS_ENABLED} > - + {({safeAreaPaddingBottomStyle}) => ( <> + 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/perDiem/WorkspacePerDiemDetailsPage.tsx b/src/pages/workspace/perDiem/WorkspacePerDiemDetailsPage.tsx index be60e46c15649..6f4cc0f4dafca 100644 --- a/src/pages/workspace/perDiem/WorkspacePerDiemDetailsPage.tsx +++ b/src/pages/workspace/perDiem/WorkspacePerDiemDetailsPage.tsx @@ -71,7 +71,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 03212428f3e63..65218ca8664ae 100644 --- a/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx +++ b/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx @@ -364,7 +364,6 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_PER_DIEM_RATES_ENABLED} > 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/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/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/RulesBillableDefaultPage.tsx b/src/pages/workspace/rules/RulesBillableDefaultPage.tsx index 2b9d42ed748c4..aaeea479d9ab7 100644 --- a/src/pages/workspace/rules/RulesBillableDefaultPage.tsx +++ b/src/pages/workspace/rules/RulesBillableDefaultPage.tsx @@ -64,7 +64,6 @@ function RulesBillableDefaultPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED} > 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/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/WorkspaceCreateTagPage.tsx b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx index 57a4286561e91..71c2b1295c0c5 100644 --- a/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx +++ b/src/pages/workspace/tags/WorkspaceCreateTagPage.tsx @@ -72,7 +72,6 @@ function CreateTagPage({route}: CreateTagPageProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_TAGS_ENABLED} > diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 7e61667d6b45b..82c6dc31da3bb 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -409,7 +409,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 3568ff7e1ba0a..2af923d409832 100644 --- a/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx @@ -282,7 +282,6 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) { featureName={CONST.POLICY.MORE_FEATURES.ARE_TAGS_ENABLED} > 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/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/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/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index e597e89a956b3..38a8cc0eabfa2 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -317,7 +317,6 @@ function WorkspaceTaxesPage({ featureName={CONST.POLICY.MORE_FEATURES.ARE_TAXES_ENABLED} > - + - + - + - + - + CONST.NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD) { + 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 CONST.NAVIGATION_BAR_TYPE.GESTURE_BAR; + } + + // 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 new file mode 100644 index 0000000000000..a53e0d05da940 --- /dev/null +++ b/src/styles/utils/getNavigationBarType/index.ios.ts @@ -0,0 +1,17 @@ +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; + + // On iOS, if there is a bottom safe area inset, it means the device uses a gesture bar. + if (bottomInset > 0) { + return CONST.NAVIGATION_BAR_TYPE.GESTURE_BAR; + } + + // If there is no bottom safe area inset, the device uses a physical navigation button. + 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 new file mode 100644 index 0000000000000..90639fa31847d --- /dev/null +++ b/src/styles/utils/getNavigationBarType/index.ts @@ -0,0 +1,9 @@ +import CONST from '@src/CONST'; +import type {NavigationBarType} from './types'; + +function getNavigationBarType(): NavigationBarType { + // On web, there is no navigation bar. + return CONST.NAVIGATION_BAR_TYPE.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 64737d7b6bef4..b9cfd07326619 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'; @@ -330,10 +331,11 @@ type SafeAreaPadding = { }; /** - * Takes safe area insets and returns padding to use for a View + * Takes safe area insets and returns platform specific padding to use for a View */ -function getSafeAreaPadding(insets?: EdgeInsets, insetsPercentageProp?: number): SafeAreaPadding { +function getPlatformSafeAreaPadding(insets?: EdgeInsets, insetsPercentageProp?: number): SafeAreaPadding { const platform = getPlatform(); + let insetsPercentage = insetsPercentageProp; if (insetsPercentage == null) { switch (platform) { @@ -350,7 +352,7 @@ function getSafeAreaPadding(insets?: EdgeInsets, insetsPercentageProp?: number): return { paddingTop: insets?.top ?? 0, - paddingBottom: (insets?.bottom ?? 0) * insetsPercentage, + paddingBottom: insets?.bottom ?? 0 * insetsPercentage, paddingLeft: (insets?.left ?? 0) * insetsPercentage, paddingRight: (insets?.right ?? 0) * insetsPercentage, }; @@ -1224,7 +1226,7 @@ const staticStyleUtils = { getPaymentMethodMenuWidth, getSafeAreaInsets, getSafeAreaMargins, - getSafeAreaPadding, + getPlatformSafeAreaPadding, getSignInWordmarkWidthStyle, getTextColorStyle, getTransparentColor, @@ -1249,6 +1251,7 @@ const staticStyleUtils = { getBorderRadiusStyle, getHighResolutionInfoWrapperStyle, getItemBackgroundColorStyle, + getNavigationBarType, }; const createStyleUtils = (theme: ThemeColors, styles: ThemeStyles) => ({