Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
e7bbab5
Move SCREENS.SEARCH.MONEY_REQUEST_REPORT to RHP
WojtekBoman Oct 23, 2025
11f5d94
Add SuperWideRHP
WojtekBoman Oct 28, 2025
017f134
Refactor BaseOverlay margin props
WojtekBoman Oct 28, 2025
0f1fb88
Adjust overlays
WojtekBoman Oct 29, 2025
40b8a9e
merged main
collectioneur Nov 1, 2025
addada0
Merge branch 'main' into collectioneur/nav/swrhp
collectioneur Nov 4, 2025
1bbf882
Adjust overlays widths
WojtekBoman Nov 4, 2025
80d917a
added handling for dynamic window size
collectioneur Nov 5, 2025
7a05cf8
Merge branch 'nav/swrhp' into collectioneur/nav/swrhp
collectioneur Nov 5, 2025
db1f6a2
fixed some errors + small cleanup
collectioneur Nov 5, 2025
77ea3cf
Fix animations when opening rphs
WojtekBoman Nov 5, 2025
fc7a4c2
added receipt to reports with one transaction in reports tab
collectioneur Nov 5, 2025
838456e
Merge branch 'nav/swrhp' into collectioneur/nav/swrhp
collectioneur Nov 5, 2025
8c773cd
cleanup
collectioneur Nov 5, 2025
fb1000f
fixed arrow buttons in reports tab
collectioneur Nov 6, 2025
f8d1801
fixed buttons on super wide rhp
collectioneur Nov 6, 2025
0838583
Adjust overlay widths
WojtekBoman Nov 6, 2025
5261d34
Fix animations
WojtekBoman Nov 7, 2025
00c8d0f
Fix navigating to second swrhp
WojtekBoman Nov 7, 2025
bc0e137
Fix showing secondary overlay
WojtekBoman Nov 12, 2025
d3d3e8d
Fix flickering overlay
WojtekBoman Nov 13, 2025
1047783
Fix showing overlay when navigating back from Inbox
WojtekBoman Nov 13, 2025
d895eae
Fix navigating back after deleting expense
WojtekBoman Nov 13, 2025
c017a39
Adjust WideRHPContextType types
WojtekBoman Nov 14, 2025
bd95c58
Add expense report rhp page
WojtekBoman Nov 14, 2025
37701fb
Merge branch 'main' into nav/swrhp
WojtekBoman Nov 14, 2025
eb6c8ed
Run prettier
WojtekBoman Nov 14, 2025
efa43f0
added wrhp back button fix and fixed styles on super wide rhp
collectioneur Nov 14, 2025
2f8ec7c
Fix displaying secondary overlay
WojtekBoman Nov 14, 2025
fbb995c
removed unnecessary function
collectioneur Nov 14, 2025
10114db
Add comments
WojtekBoman Nov 14, 2025
eb17e49
Fix styles
WojtekBoman Nov 14, 2025
1c1fdaa
Fix spell check
WojtekBoman Nov 14, 2025
fbee6db
fixed some types
collectioneur Nov 14, 2025
df9b81d
fixed some eslint errors and types
collectioneur Nov 14, 2025
dc38b79
Fix ts
WojtekBoman Nov 14, 2025
521ae1a
Fix abs function types
WojtekBoman Nov 14, 2025
dba4c2b
Fix missing default values in WideRHPContextProvider
WojtekBoman Nov 14, 2025
ce426e5
Merge branch 'main' into nav/swrhp
WojtekBoman Nov 16, 2025
8713c06
Add dismissToFirstRHP and dismissToSecondRHP methods
WojtekBoman Nov 17, 2025
ce181b3
Refactor styles in RightModalNavigator
WojtekBoman Nov 17, 2025
3d9713b
Add docs for overlays displayed in RightModalNavigator
WojtekBoman Nov 17, 2025
9bd91b7
Add docs for overlays displayed in ModalStackNavigators
WojtekBoman Nov 17, 2025
011514c
Simplify WideRHPContextProvider logic
WojtekBoman Nov 17, 2025
5f377cc
Merge branch 'main' into nav/swrhp
WojtekBoman Nov 17, 2025
fa43422
Adjust default values and types in WideRHPContextProvider
WojtekBoman Nov 18, 2025
06ac45a
Add docs for outputRangeMultiplier for rightModalNavigator
WojtekBoman Nov 18, 2025
f3bed80
Handle e/:reportID url when sending data about opened report to sentry
WojtekBoman Nov 18, 2025
fc4ad27
Simplify setting rhp progress values
WojtekBoman Nov 18, 2025
bcbf94c
Fix animation when closing single rhp displayed on swrhp
WojtekBoman Nov 18, 2025
69a2daa
fixed back button and clicking to parent report when swrhp is already…
collectioneur Nov 18, 2025
a0ff628
Adjust shouldShowSecondaryOverlay
WojtekBoman Nov 18, 2025
2ba0f03
Adjust shouldShowTertiaryOverlay
WojtekBoman Nov 18, 2025
30471d0
fixed back button swrhp
collectioneur Nov 18, 2025
f047bc8
Optimize methods in WideRHPContextProvider
WojtekBoman Nov 18, 2025
6f35792
Fix text formatting
WojtekBoman Nov 18, 2025
b83a8b2
Add SCREENS.RIGHT_MODAL.SEARCH_REPORT_ACTIONS
WojtekBoman Nov 18, 2025
eddc2e9
Add markReportIDAsMultiTransactionExpense
WojtekBoman Nov 19, 2025
a1b283b
changed styles to display superWideRHP in wide layout
collectioneur Nov 19, 2025
4de7f3e
Adjust reading wide and super wide rhp keys
WojtekBoman Nov 19, 2025
e1286e6
Fix showing not found page when deleting transactions
WojtekBoman Nov 19, 2025
e09233c
fixed adding expense and dismissing to the first wide/super wide rhp …
collectioneur Nov 19, 2025
945caf1
added export constants also for mobile devices
collectioneur Nov 19, 2025
d04fa90
Merge pull request #255 from software-mansion-labs/fix-close-animatio…
WojtekBoman Nov 19, 2025
57c2cde
Run prettier
WojtekBoman Nov 19, 2025
597a3d6
Merge branch 'main' into nav/swrhp
WojtekBoman Nov 20, 2025
14c29dd
eslint fix
collectioneur Nov 20, 2025
e9dbe5a
fixed confirm navigation for split and merge in report
collectioneur Nov 20, 2025
980b84f
fix prettier
collectioneur Nov 20, 2025
ade17a8
fix tests
collectioneur Nov 20, 2025
0975fbe
Merge branch 'main' into nav/swrhp
WojtekBoman Nov 20, 2025
a1864bd
Remove SearchTransaction type usage from Search/index.tsx and IOU.ts
WojtekBoman Nov 20, 2025
b73f655
fixed opening wide rhp as super wide rhp after deleting transactions
collectioneur Nov 20, 2025
559ffbc
Merge branch 'main' into nav/swrhp
WojtekBoman Nov 20, 2025
d9f30dc
Fix imports in IOU.ts
WojtekBoman Nov 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ const ROUTES = {
return getUrlWithBackToParam(baseRoute, backTo);
},
},

EXPENSE_REPORT_RHP: {
route: 'e/:reportID',
getRoute: ({reportID, backTo}: {reportID: string; backTo?: string}) => {
const baseRoute = `e/${reportID}` as const;

// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
return getUrlWithBackToParam(baseRoute, backTo);
},
},

SEARCH_REPORT_VERIFY_ACCOUNT: {
route: `search/view/:reportID/${VERIFY_ACCOUNT}`,
getRoute: (reportID: string) => `search/view/${reportID}/${VERIFY_ACCOUNT}` as const,
Expand Down
4 changes: 4 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ const SCREENS = {
TRANSACTION_DUPLICATE: 'TransactionDuplicate',
TRAVEL: 'Travel',
SEARCH_REPORT: 'SearchReport',
SEARCH_REPORT_ACTIONS: 'SearchReportActions',
SEARCH_MONEY_REQUEST_REPORT: 'SearchMoneyRequestReport',
SEARCH_ADVANCED_FILTERS: 'SearchAdvancedFilters',
SEARCH_SAVED_SEARCH: 'SearchSavedSearch',
SETTINGS_CATEGORIES: 'SettingsCategories',
Expand All @@ -259,8 +261,10 @@ const SCREENS = {
REPORT_CHANGE_APPROVER: 'Report_Change_Approver',
REPORT_VERIFY_ACCOUNT: 'Report_Verify_Account',
MERGE_TRANSACTION: 'MergeTransaction',
EXPENSE_REPORT: 'ExpenseReport',
DOMAIN: 'Domain',
},
EXPENSE_REPORT_RHP: 'Expense_Report_RHP',
PUBLIC_CONSOLE_DEBUG: 'Console_Debug',
SIGN_IN_WITH_APPLE_DESKTOP: 'AppleSignInDesktop',
SIGN_IN_WITH_GOOGLE_DESKTOP: 'GoogleSignInDesktop',
Expand Down
18 changes: 12 additions & 6 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import Log from '@libs/Log';
import {getThreadReportIDsForTransactions, getTotalAmountForIOUReportPreviewButton} from '@libs/MoneyRequestReportUtils';
import Navigation from '@libs/Navigation/Navigation';
import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types';
import type {ReportsSplitNavigatorParamList, SearchFullscreenNavigatorParamList, SearchReportParamList} from '@libs/Navigation/types';
import type {ReportsSplitNavigatorParamList, SearchMoneyRequestReportParamList, SearchReportParamList} from '@libs/Navigation/types';
import {buildOptimisticNextStepForPreventSelfApprovalsEnabled, buildOptimisticNextStepForStrictPolicyRuleViolations} from '@libs/NextStepUtils';
import type {KYCFlowEvent, TriggerKYCFlow} from '@libs/PaymentUtils';
import {selectPaymentType} from '@libs/PaymentUtils';
Expand Down Expand Up @@ -185,7 +185,7 @@ function MoneyReportHeader({
const shouldDisplayNarrowVersion = shouldUseNarrowLayout || isMediumScreenWidth;
const route = useRoute<
| PlatformStackRouteProp<ReportsSplitNavigatorParamList, typeof SCREENS.REPORT>
| PlatformStackRouteProp<SearchFullscreenNavigatorParamList, typeof SCREENS.SEARCH.MONEY_REQUEST_REPORT>
| PlatformStackRouteProp<SearchMoneyRequestReportParamList, typeof SCREENS.SEARCH.MONEY_REQUEST_REPORT>
| PlatformStackRouteProp<SearchReportParamList, typeof SCREENS.SEARCH.REPORT_RHP>
>();
const {login: currentUserLogin, accountID, email} = useCurrentUserPersonalDetails();
Expand Down Expand Up @@ -352,9 +352,9 @@ function MoneyReportHeader({
const {selectedTransactionIDs, removeTransaction, clearSelectedTransactions, currentSearchQueryJSON, currentSearchKey, currentSearchHash} = useSearchContext();
const shouldCalculateTotals = useSearchShouldCalculateTotals(currentSearchKey, currentSearchQueryJSON?.similarSearchHash, true);

const {wideRHPRouteKeys} = useContext(WideRHPContext);
const {wideRHPRouteKeys, superWideRHPRouteKeys} = useContext(WideRHPContext);
const [network] = useOnyx(ONYXKEYS.NETWORK, {canBeMissing: true});
const shouldDisplayNarrowMoreButton = !shouldDisplayNarrowVersion || (wideRHPRouteKeys.length > 0 && !isSmallScreenWidth);
const shouldDisplayNarrowMoreButton = !shouldDisplayNarrowVersion || ((wideRHPRouteKeys.length > 0 || superWideRHPRouteKeys.length > 0) && !isSmallScreenWidth);

const showExportProgressModal = useCallback(() => {
return showConfirmModal({
Expand Down Expand Up @@ -1392,7 +1392,7 @@ function MoneyReportHeader({

const showNextStepBar = shouldShowNextStep && !!optimisticNextStep?.message?.length;
const showNextStepSkeleton = shouldShowNextStep && !optimisticNextStep && !!isLoadingInitialReportActions && !isOffline;
const shouldShowMoreContent = showNextStepBar || showNextStepSkeleton || !!statusBarProps || isReportInSearch;
const shouldShowMoreContent = showNextStepBar || showNextStepSkeleton || !!statusBarProps || (isReportInSearch && !shouldDisplayNarrowMoreButton);

return (
<View style={[styles.pt0, styles.borderBottom]}>
Expand Down Expand Up @@ -1433,6 +1433,12 @@ function MoneyReportHeader({
/>
</View>
)}
{isReportInSearch && (
<MoneyRequestReportNavigation
reportID={moneyRequestReport?.reportID}
shouldDisplayNarrowVersion={!shouldDisplayNarrowMoreButton}
/>
)}
</View>
)}
</HeaderWithBackButton>
Expand Down Expand Up @@ -1477,7 +1483,7 @@ function MoneyReportHeader({
/>
)}
</View>
{isReportInSearch && (
{isReportInSearch && !shouldDisplayNarrowMoreButton && (
<MoneyRequestReportNavigation
reportID={moneyRequestReport?.reportID}
shouldDisplayNarrowVersion={shouldDisplayNarrowVersion}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {isUserValidatedSelector} from '@selectors/Account';
import {accountIDSelector} from '@selectors/Session';
import {tierNameSelector} from '@selectors/UserWallet';
import isEmpty from 'lodash/isEmpty';
import React, {useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react';
import React, {useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react';
import type {NativeScrollEvent, NativeSyntheticEvent} from 'react-native';
import {DeviceEventEmitter, InteractionManager, View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
Expand All @@ -20,6 +20,7 @@ import {PressableWithFeedback} from '@components/Pressable';
import ScrollView from '@components/ScrollView';
import {useSearchContext} from '@components/Search/SearchContext';
import Text from '@components/Text';
import {WideRHPContext} from '@components/WideRHPContextProvider';
import useLoadReportActions from '@hooks/useLoadReportActions';
import useLocalize from '@hooks/useLocalize';
import useMobileSelectionMode from '@hooks/useMobileSelectionMode';
Expand Down Expand Up @@ -165,7 +166,10 @@ function MoneyRequestReportActionsList({
const isReportArchived = useReportIsArchived(reportID);
const canPerformWriteAction = canUserPerformWriteAction(report, isReportArchived);

const {shouldUseNarrowLayout} = useResponsiveLayout();
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {shouldUseNarrowLayout: shouldUseNarrowLayoutByDefault, isSmallScreenWidth} = useResponsiveLayout();
const {superWideRHPRouteKeys} = useContext(WideRHPContext);
const shouldUseNarrowLayout = shouldUseNarrowLayoutByDefault && (superWideRHPRouteKeys.length === 0 || isSmallScreenWidth);
Comment on lines +170 to +172

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should be abstracted out


const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false});
const [offlineModalVisible, setOfflineModalVisible] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, {useEffect, useMemo, useRef} from 'react';
import React, {useContext, useEffect, useMemo, useRef} from 'react';
import type {View} from 'react-native';
import {getButtonRole} from '@components/Button/utils';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import {PressableWithFeedback} from '@components/Pressable';
import type {SearchColumnType, TableColumnSize} from '@components/Search/types';
import {getExpenseHeaders} from '@components/SelectionListWithSections/SearchTableHeader';
import TransactionItemRow from '@components/TransactionItemRow';
import {WideRHPContext} from '@components/WideRHPContextProvider';
import useAnimatedHighlightStyle from '@hooks/useAnimatedHighlightStyle';
import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
Expand Down Expand Up @@ -86,7 +87,9 @@ function MoneyRequestReportTransactionItem({
const {translate} = useLocalize();
const styles = useThemeStyles();
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {isSmallScreenWidth, isMediumScreenWidth, isLargeScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();
const {isSmallScreenWidth, isMediumScreenWidth, isLargeScreenWidth, shouldUseNarrowLayout: shouldUseNarrowLayoutByDefault} = useResponsiveLayout();
const {superWideRHPRouteKeys} = useContext(WideRHPContext);
const shouldUseNarrowLayout = shouldUseNarrowLayoutByDefault && (superWideRHPRouteKeys.length === 0 || isSmallScreenWidth);
const theme = useTheme();
const isPendingDelete = isTransactionPendingDelete(transaction);
const pendingAction = getTransactionPendingAction(transaction);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import type {TupleToUnion} from 'type-fest';
import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu';
import Checkbox from '@components/Checkbox';
import * as Expensicons from '@components/Icon/Expensicons';

Check warning on line 8 in src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used by a pattern. Direct imports from Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details

Check warning on line 8 in src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'@components/Icon/Expensicons' import is restricted from being used. Direct imports from @components/Icon/Expensicons are deprecated. Please use lazy loading hooks instead. Use `useMemoizedLazyExpensifyIcons` from @hooks/useLazyAsset. See docs/LAZY_ICONS_AND_ILLUSTRATIONS.md for details
import MenuItem from '@components/MenuItem';
import Modal from '@components/Modal';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
Expand Down Expand Up @@ -161,7 +161,9 @@
const StyleUtils = useStyleUtils();
const {translate, localeCompare} = useLocalize();
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {shouldUseNarrowLayout, isSmallScreenWidth, isMediumScreenWidth} = useResponsiveLayout();
const {shouldUseNarrowLayout: shouldUseNarrowLayoutByDefault, isSmallScreenWidth, isMediumScreenWidth} = useResponsiveLayout();
const {superWideRHPRouteKeys} = useContext(WideRHPContext);
const shouldUseNarrowLayout = shouldUseNarrowLayoutByDefault && (superWideRHPRouteKeys.length === 0 || isSmallScreenWidth);
const {markReportIDAsExpense} = useContext(WideRHPContext);
const [isModalVisible, setIsModalVisible] = useState(false);
const [selectedTransactionID, setSelectedTransactionID] = useState<string>('');
Expand Down
112 changes: 74 additions & 38 deletions src/components/MoneyRequestReportView/MoneyRequestReportView.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import {PortalHost} from '@gorhom/portal';
import React, {useCallback, useMemo} from 'react';
import {InteractionManager, View} from 'react-native';
// We use Animated for all functionality related to wide RHP to make it easier
// to interact with react-navigation components (e.g., CardContainer, interpolator), which also use Animated.
// eslint-disable-next-line no-restricted-imports
import {Animated, InteractionManager, ScrollView, View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import HeaderGap from '@components/HeaderGap';
import MoneyReportHeader from '@components/MoneyReportHeader';
import MoneyRequestHeader from '@components/MoneyRequestHeader';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import MoneyRequestReceiptView from '@components/ReportActionItem/MoneyRequestReceiptView';
import ReportActionsSkeletonView from '@components/ReportActionsSkeletonView';
import ReportHeaderSkeletonView from '@components/ReportHeaderSkeletonView';
import useNetwork from '@hooks/useNetwork';
import useNewTransactions from '@hooks/useNewTransactions';
import useOnyx from '@hooks/useOnyx';
import usePaginatedReportActions from '@hooks/usePaginatedReportActions';
import useParentReportAction from '@hooks/useParentReportAction';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import useTransactionsAndViolationsForReport from '@hooks/useTransactionsAndViolationsForReport';
import {removeFailedReport} from '@libs/actions/Report';
Expand Down Expand Up @@ -56,6 +61,16 @@ function goBackFromSearchMoneyRequest() {
const rootState = navigationRef.getRootState();
const lastRoute = rootState.routes.at(-1);

if (!lastRoute) {
Log.hmmm('[goBackFromSearchMoneyRequest()] No last route found in root state.');
return;
}

if (lastRoute?.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) {
Navigation.goBack();
return;
}

if (lastRoute?.name !== NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR) {
Log.hmmm('[goBackFromSearchMoneyRequest()] goBackFromSearchMoneyRequest was called from a different navigator than SearchFullscreenNavigator.');
return;
Expand Down Expand Up @@ -84,6 +99,10 @@ function MoneyRequestReportView({report, policy, reportMetadata, shouldDisplayRe
const styles = useThemeStyles();
const {isOffline} = useNetwork();

// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {isSmallScreenWidth} = useResponsiveLayout();

const [allReports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {canBeMissing: false});
const reportID = report?.reportID;
const [isLoadingApp] = useOnyx(ONYXKEYS.IS_LOADING_APP, {canBeMissing: true});
const [isComposerFullSize = false] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${reportID}`, {canBeMissing: true});
Expand Down Expand Up @@ -129,6 +148,9 @@ function MoneyRequestReportView({report, policy, reportMetadata, shouldDisplayRe
const isEmptyTransactionReport = visibleTransactions && visibleTransactions.length === 0 && transactionThreadReportID === undefined;
const shouldDisplayMoneyRequestActionsList = !!isEmptyTransactionReport || shouldDisplayReportTableView(report, visibleTransactions ?? []);

const [transactionThreadReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transactionThreadReportID}`, {canBeMissing: true});
const shouldShowWideRHPReceipt = visibleTransactions.length === 1 && !isSmallScreenWidth && !!transactionThreadReport;

const reportHeaderView = useMemo(
() =>
isTransactionThreadView ? (
Expand Down Expand Up @@ -211,47 +233,61 @@ function MoneyRequestReportView({report, policy, reportMetadata, shouldDisplayRe
>
<HeaderGap />
{reportHeaderView}
<View style={[styles.overflowHidden, styles.justifyContentEnd, styles.flex1]}>
{shouldDisplayMoneyRequestActionsList ? (
<MoneyRequestReportActionsList
report={report}
policy={policy}
transactions={visibleTransactions}
hasPendingDeletionTransaction={hasPendingDeletionTransaction}
newTransactions={newTransactions}
reportActions={reportActions}
violations={allReportViolations}
hasOlderActions={hasOlderActions}
hasNewerActions={hasNewerActions}
showReportActionsLoadingState={isLoadingInitialReportActions && !reportMetadata?.hasOnceLoadedReportActions}
/>
) : (
<ReportActionsView
report={report}
reportActions={reportActions}
isLoadingInitialReportActions={reportMetadata?.isLoadingInitialReportActions}
hasNewerActions={hasNewerActions}
hasOlderActions={hasOlderActions}
parentReportAction={parentReportAction}
transactionThreadReportID={transactionThreadReportID}
/>
<View style={[styles.flex1, styles.flexRow]}>
{shouldShowWideRHPReceipt && (
<Animated.View style={styles.wideRHPMoneyRequestReceiptViewContainer}>
<ScrollView contentContainerStyle={styles.wideRHPMoneyRequestReceiptViewScrollViewContainer}>
<MoneyRequestReceiptView
allReports={allReports}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but I dont understand why this component should be getting full reports collection

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the components needs parent and chat report so we could have just passed the two, I believe @adamgrzybowski is in blame so ideally SWM can take a look at this

report={transactionThreadReport}
fillSpace
isDisplayedInWideRHP
/>
</ScrollView>
</Animated.View>
)}
{shouldDisplayReportFooter ? (
<>
<ReportFooter
<View style={[[styles.flex1, styles.justifyContentEnd, styles.overflowHidden]]}>
{shouldDisplayMoneyRequestActionsList ? (
<MoneyRequestReportActionsList
report={report}
reportMetadata={reportMetadata}
policy={policy}
pendingAction={reportPendingAction}
isComposerFullSize={!!isComposerFullSize}
lastReportAction={lastReportAction}
reportTransactions={transactions}
// If the report is from the 'Send Money' flow, we add the comment to the `iou` report because for these we don't combine reportActions even if there is a single transaction (they always have a single transaction)
transactionThreadReportID={isSentMoneyReport ? undefined : transactionThreadReportID}
transactions={visibleTransactions}
hasPendingDeletionTransaction={hasPendingDeletionTransaction}
newTransactions={newTransactions}
reportActions={reportActions}
violations={allReportViolations}
hasOlderActions={hasOlderActions}
hasNewerActions={hasNewerActions}
showReportActionsLoadingState={isLoadingInitialReportActions && !reportMetadata?.hasOnceLoadedReportActions}
/>
) : (
<ReportActionsView
report={report}
reportActions={reportActions}
isLoadingInitialReportActions={reportMetadata?.isLoadingInitialReportActions}
hasNewerActions={hasNewerActions}
hasOlderActions={hasOlderActions}
parentReportAction={parentReportAction}
transactionThreadReportID={transactionThreadReportID}
/>
<PortalHost name="suggestions" />
</>
) : null}
)}
{shouldDisplayReportFooter ? (
<>
<ReportFooter
report={report}
reportMetadata={reportMetadata}
policy={policy}
pendingAction={reportPendingAction}
isComposerFullSize={!!isComposerFullSize}
lastReportAction={lastReportAction}
reportTransactions={transactions}
// If the report is from the 'Send Money' flow, we add the comment to the `iou` report because for these we don't combine reportActions even if there is a single transaction (they always have a single transaction)
transactionThreadReportID={isSentMoneyReport ? undefined : transactionThreadReportID}
/>
<PortalHost name="suggestions" />
</>
) : null}
</View>
</View>
</OfflineWithFeedback>
</View>
Expand Down
Loading
Loading