diff --git a/src/components/HeaderWithBackButton/index.tsx b/src/components/HeaderWithBackButton/index.tsx index 96c2c9c6b7f92..7e1de49ba2065 100755 --- a/src/components/HeaderWithBackButton/index.tsx +++ b/src/components/HeaderWithBackButton/index.tsx @@ -69,7 +69,7 @@ function HeaderWithBackButton({ shouldOverlayDots = false, shouldOverlay = false, shouldNavigateToTopMostReport = false, - shouldDisplayHelpButton = true, + shouldDisplayHelpButton = false, shouldDisplaySearchRouter = false, progressBarPercentage, style, @@ -344,8 +344,8 @@ function HeaderWithBackButton({ )} - {shouldDisplayHelpButton && } {shouldDisplaySearchRouter && } + {shouldDisplayHelpButton && } ); diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 0e6b04954ac94..12db0d36e4e66 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -1817,6 +1817,7 @@ function MoneyReportHeader({ report={moneyRequestReport} shouldShowBackButton={shouldShowBackButton} shouldDisplaySearchRouter={shouldDisplaySearchRouter} + shouldDisplayHelpButton={!(isReportInRHP && shouldUseNarrowLayout)} onBackButtonPress={onBackButtonPress} shouldShowBorderBottom={false} shouldEnableDetailPageNavigation diff --git a/src/components/Navigation/TopBar.tsx b/src/components/Navigation/TopBar.tsx index 62579cd94c375..6783188e263f0 100644 --- a/src/components/Navigation/TopBar.tsx +++ b/src/components/Navigation/TopBar.tsx @@ -28,7 +28,7 @@ type TopBarProps = { const authTokenTypeSelector = (session: OnyxEntry) => session && {authTokenType: session.authTokenType}; -function TopBar({breadcrumbLabel, shouldDisplaySearch = true, shouldDisplayHelpButton = true, cancelSearch, shouldShowLoadingBar = false, children}: TopBarProps) { +function TopBar({breadcrumbLabel, shouldDisplaySearch = true, shouldDisplayHelpButton = false, cancelSearch, shouldShowLoadingBar = false, children}: TopBarProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const [session] = useOnyx(ONYXKEYS.SESSION, {selector: authTokenTypeSelector}); @@ -72,8 +72,8 @@ function TopBar({breadcrumbLabel, shouldDisplaySearch = true, shouldDisplayHelpB {translate('common.cancel')} )} - {shouldDisplayHelpButton && } {displaySearch && } + {shouldDisplayHelpButton && } diff --git a/src/pages/Search/SearchPageNarrow.tsx b/src/pages/Search/SearchPageNarrow.tsx index 285c94bb4ffed..3470d12efaba4 100644 --- a/src/pages/Search/SearchPageNarrow.tsx +++ b/src/pages/Search/SearchPageNarrow.tsx @@ -197,6 +197,7 @@ function SearchPageNarrow({ shouldShowLoadingBar={shouldShowLoadingState} breadcrumbLabel={translate('common.reports')} shouldDisplaySearch={false} + shouldDisplayHelpButton cancelSearch={shouldDisplayCancelSearch ? cancelSearchCallback : undefined} /> diff --git a/src/pages/TeachersUnite/SaveTheWorldPage.tsx b/src/pages/TeachersUnite/SaveTheWorldPage.tsx index 65807a2163808..019029b24be2c 100644 --- a/src/pages/TeachersUnite/SaveTheWorldPage.tsx +++ b/src/pages/TeachersUnite/SaveTheWorldPage.tsx @@ -65,6 +65,7 @@ function SaveTheWorldPage() { title={translate('sidebarScreen.saveTheWorld')} shouldShowBackButton={shouldUseNarrowLayout} shouldDisplaySearchRouter + shouldDisplayHelpButton onBackButtonPress={Navigation.goBack} icon={illustrations.TeachersUnite} shouldUseHeadlineHeader diff --git a/src/pages/home/HomePage.tsx b/src/pages/home/HomePage.tsx index 3ab2bcb81f442..3ecee16823862 100644 --- a/src/pages/home/HomePage.tsx +++ b/src/pages/home/HomePage.tsx @@ -59,6 +59,7 @@ function HomePage() { )} - {!isInSidePanel && } - {shouldDisplaySearchRouter && } + {shouldDisplaySearchRouter && } + {!isInSidePanel && } )} diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx index 844a353571dad..bc4051cb59cbe 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.tsx @@ -1476,7 +1476,6 @@ function IOURequestStepConfirmation({ title={headerTitle} subtitle={hasMultipleTransactions ? `${currentTransactionIndex + 1} ${translate('common.of')} ${transactions.length}` : undefined} onBackButtonPress={navigateBack} - shouldDisplayHelpButton={!hasMultipleTransactions} > {hasMultipleTransactions ? ( {shouldDisplayLHB && } + {shouldUseNarrowLayout && ( + + )} {headerContent} diff --git a/src/pages/settings/Profile/ProfilePage.tsx b/src/pages/settings/Profile/ProfilePage.tsx index bc0eafcd9e094..d010e611e3d9f 100755 --- a/src/pages/settings/Profile/ProfilePage.tsx +++ b/src/pages/settings/Profile/ProfilePage.tsx @@ -181,6 +181,7 @@ function ProfilePage() { }} shouldShowBackButton={shouldUseNarrowLayout} shouldDisplaySearchRouter + shouldDisplayHelpButton icon={Profile} shouldUseHeadlineHeader /> diff --git a/src/pages/settings/Rules/ExpenseRulesPage.tsx b/src/pages/settings/Rules/ExpenseRulesPage.tsx index 76f2ed6eaa4a4..2994d1e187421 100644 --- a/src/pages/settings/Rules/ExpenseRulesPage.tsx +++ b/src/pages/settings/Rules/ExpenseRulesPage.tsx @@ -251,6 +251,7 @@ function ExpenseRulesPage() { }} shouldShowBackButton={shouldUseNarrowLayout} shouldUseHeadlineHeader={!selectionModeHeader} + shouldDisplayHelpButton title={selectionModeHeader ? translate('common.selectMultiple') : translate('expenseRulesPage.title')} > {!shouldUseNarrowLayout && headerButton} diff --git a/src/pages/settings/Security/SecuritySettingsPage.tsx b/src/pages/settings/Security/SecuritySettingsPage.tsx index bff10b7b8b6d7..b5bbce587f810 100644 --- a/src/pages/settings/Security/SecuritySettingsPage.tsx +++ b/src/pages/settings/Security/SecuritySettingsPage.tsx @@ -401,6 +401,7 @@ function SecuritySettingsPage() { icon={illustrations.LockClosed} shouldUseHeadlineHeader shouldDisplaySearchRouter + shouldDisplayHelpButton /> diff --git a/src/pages/settings/Subscription/SubscriptionSettingsPage.tsx b/src/pages/settings/Subscription/SubscriptionSettingsPage.tsx index ec683858d1fd9..b4498c2b7c665 100644 --- a/src/pages/settings/Subscription/SubscriptionSettingsPage.tsx +++ b/src/pages/settings/Subscription/SubscriptionSettingsPage.tsx @@ -67,6 +67,7 @@ function SubscriptionSettingsPage({route}: SubscriptionSettingsPageProps) { }} shouldShowBackButton={shouldUseNarrowLayout} shouldDisplaySearchRouter + shouldDisplayHelpButton icon={illustrations.CreditCardsNew} shouldUseHeadlineHeader /> diff --git a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx index d8f6e9b5a24e1..51bda9db5e03e 100644 --- a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx +++ b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx @@ -173,6 +173,7 @@ function TroubleshootPage() { title={translate('initialSettingsPage.aboutPage.troubleshoot')} shouldShowBackButton={shouldUseNarrowLayout} shouldDisplaySearchRouter + shouldDisplayHelpButton onBackButtonPress={Navigation.goBack} icon={illustrations.Lightbulb} shouldUseHeadlineHeader diff --git a/src/pages/settings/Wallet/WalletPage/index.tsx b/src/pages/settings/Wallet/WalletPage/index.tsx index a6f83b09c40c2..cf1593479b0f4 100644 --- a/src/pages/settings/Wallet/WalletPage/index.tsx +++ b/src/pages/settings/Wallet/WalletPage/index.tsx @@ -336,6 +336,7 @@ function WalletPage() { shouldUseHeadlineHeader shouldShowBackButton={shouldUseNarrowLayout} shouldDisplaySearchRouter + shouldDisplayHelpButton /> ); diff --git a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx index 84fa8adcd2caf..e035b7991a495 100644 --- a/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx +++ b/src/pages/workspace/WorkspaceMoreFeaturesPage.tsx @@ -634,6 +634,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro shouldUseHeadlineHeader title={translate('workspace.common.moreFeatures')} shouldShowBackButton={shouldUseNarrowLayout} + shouldDisplayHelpButton onBackButtonPress={() => Navigation.goBack()} /> diff --git a/src/pages/workspace/WorkspacePageWithSections.tsx b/src/pages/workspace/WorkspacePageWithSections.tsx index 96094c093a7d7..76f4d538d57a9 100644 --- a/src/pages/workspace/WorkspacePageWithSections.tsx +++ b/src/pages/workspace/WorkspacePageWithSections.tsx @@ -224,6 +224,7 @@ function WorkspacePageWithSections({ shouldShowThreeDotsButton={shouldShowThreeDotsButton} threeDotsMenuItems={threeDotsMenuItems} shouldUseHeadlineHeader={shouldUseHeadlineHeader} + shouldDisplayHelpButton > {headerContent} diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 3ed37e8cf06f7..79b39f5a36c5e 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -735,7 +735,12 @@ function WorkspacesListPage() { } > - {!shouldUseNarrowLayout && {headerButton}} + + {!shouldUseNarrowLayout && {headerButton}} + {shouldUseNarrowLayout && {headerButton}} {shouldShowLoadingIndicator ? ( diff --git a/src/pages/workspace/accounting/PolicyAccountingPage.tsx b/src/pages/workspace/accounting/PolicyAccountingPage.tsx index 108162cbc4d35..e7d9cffe6aa7c 100644 --- a/src/pages/workspace/accounting/PolicyAccountingPage.tsx +++ b/src/pages/workspace/accounting/PolicyAccountingPage.tsx @@ -571,6 +571,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { shouldShowBackButton={shouldUseNarrowLayout} icon={illustrations.Accounting} shouldUseHeadlineHeader + shouldDisplayHelpButton onBackButtonPress={Navigation.goBack} /> { if (isMobileSelectionModeEnabled) { setSelectedCategories([]); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index daad4e94584ff..5c53a36e5c633 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -479,6 +479,7 @@ function PolicyDistanceRatesPage({ shouldUseHeadlineHeader={!selectionModeHeader} title={translate(!selectionModeHeader ? 'workspace.common.distanceRates' : 'common.selectMultiple')} shouldShowBackButton={shouldUseNarrowLayout} + shouldDisplayHelpButton onBackButtonPress={() => { if (isMobileSelectionModeEnabled) { setSelectedDistanceRates([]); diff --git a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx index e99afac829610..992af98a1dce5 100644 --- a/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx +++ b/src/pages/workspace/expensifyCard/WorkspaceExpensifyCardListPage.tsx @@ -233,6 +233,7 @@ function WorkspaceExpensifyCardListPage({route, cardsList, fundID}: WorkspaceExp shouldUseHeadlineHeader title={translate('workspace.common.expensifyCard')} shouldShowBackButton={shouldUseNarrowLayout} + shouldDisplayHelpButton onBackButtonPress={handleBackButtonPress} > {!shouldShowSelector && !shouldUseNarrowLayout && isBankAccountVerified && getHeaderButtons()} diff --git a/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx b/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx index f94c417a581b5..9093074469d3d 100644 --- a/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx +++ b/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx @@ -425,6 +425,7 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) { title={translate(selectionModeHeader ? 'common.selectMultiple' : 'common.perDiem')} icon={!selectionModeHeader ? illustrations.PerDiem : undefined} shouldUseHeadlineHeader={!selectionModeHeader} + shouldDisplayHelpButton onBackButtonPress={() => { if (isMobileSelectionModeEnabled) { setSelectedPerDiem([]); diff --git a/src/pages/workspace/receiptPartners/WorkspaceReceiptPartnersPage.tsx b/src/pages/workspace/receiptPartners/WorkspaceReceiptPartnersPage.tsx index a182012790118..6f9f0a416a55d 100644 --- a/src/pages/workspace/receiptPartners/WorkspaceReceiptPartnersPage.tsx +++ b/src/pages/workspace/receiptPartners/WorkspaceReceiptPartnersPage.tsx @@ -270,6 +270,7 @@ function WorkspaceReceiptPartnersPage({route}: WorkspaceReceiptPartnersPageProps shouldShowBackButton={shouldUseNarrowLayout} icon={ReceiptPartners} shouldUseHeadlineHeader + shouldDisplayHelpButton onBackButtonPress={Navigation.goBack} /> {isLoading && ( diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index e9c018324d723..f5a9337e46114 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -761,6 +761,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { shouldUseHeadlineHeader={!selectionModeHeader} title={translate(selectionModeHeader ? 'common.selectMultiple' : 'workspace.common.tags')} shouldShowBackButton={shouldUseNarrowLayout} + shouldDisplayHelpButton onBackButtonPress={() => { if (isMobileSelectionModeEnabled) { setSelectedTags([]); diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index f288d647ecadd..52101eee41163 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -401,6 +401,7 @@ function WorkspaceTaxesPage({ shouldUseHeadlineHeader={!selectionModeHeader} title={translate(selectionModeHeader ? 'common.selectMultiple' : 'workspace.common.taxes')} shouldShowBackButton={shouldUseNarrowLayout} + shouldDisplayHelpButton onBackButtonPress={() => { if (isMobileSelectionModeEnabled) { setSelectedTaxesIDs([]); diff --git a/src/pages/workspace/travel/PolicyTravelPage.tsx b/src/pages/workspace/travel/PolicyTravelPage.tsx index 972cbbd0591ff..db49900ad6418 100644 --- a/src/pages/workspace/travel/PolicyTravelPage.tsx +++ b/src/pages/workspace/travel/PolicyTravelPage.tsx @@ -98,6 +98,7 @@ function WorkspaceTravelPage({ title={translate('workspace.moreFeatures.travel.title')} shouldUseHeadlineHeader shouldShowBackButton={shouldUseNarrowLayout} + shouldDisplayHelpButton onBackButtonPress={Navigation.goBack} />