Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e557808
Add SuperWideRHP
WojtekBoman Nov 24, 2025
50bb8d4
Extract helper methods from WideRHPContextProvider
WojtekBoman Nov 25, 2025
9c86a1c
Add useShouldRenderOverlay
WojtekBoman Nov 26, 2025
f0ecfd7
Extract wide rhp hooks to separate files
WojtekBoman Nov 26, 2025
b391b8e
Fix issue: Expense - + menu opens on the right end of wide RHP
WojtekBoman Nov 28, 2025
bf8a69e
add disabled empty receipt to invoice in wide rhp
collectioneur Nov 25, 2025
f0f5924
moved pagination to next step line
collectioneur Nov 25, 2025
431b47f
fix wide rhp report back button when opened after super wide rhp
collectioneur Nov 25, 2025
f8d2e13
fix report navigation behaviour on mweb and mobile devices
collectioneur Nov 26, 2025
fc9b40c
Fix imports in styles
WojtekBoman Dec 1, 2025
c7a7ef9
Split secondary overlay depending on focused rhp width
WojtekBoman Dec 2, 2025
0672f55
Add dismissToSuperWideRHP and dismissToWideRHP
WojtekBoman Dec 2, 2025
8d7fd25
Fix changing width when switching reports using arrow keys
WojtekBoman Dec 2, 2025
7bfccf3
Add useResponsiveLayoutOnWideRHP
WojtekBoman Dec 2, 2025
9fad2be
Fix issue: Reports - Workspace chat RHP does not open on Reports when…
WojtekBoman Dec 3, 2025
c31d9dc
fix animation when closing split expense modal before input is focused
collectioneur Dec 3, 2025
01eee9a
add comment
collectioneur Dec 3, 2025
c5b43e5
fix expense split flow to dismiss all modals
collectioneur Nov 25, 2025
f3cf45d
fix navigation after deleting expense from report
collectioneur Nov 26, 2025
60af655
fix navigation when dismissing modals to super wide RHP
collectioneur Dec 2, 2025
be28323
add comments
collectioneur Dec 3, 2025
1385ca5
fix eslint errors
collectioneur Dec 4, 2025
87f53f7
Add SecondaryOverlay components
WojtekBoman Dec 3, 2025
48f3a8e
Add docs for secondary overlay
WojtekBoman Dec 4, 2025
4b4036f
Fix jest unit test and spell checks
WojtekBoman Dec 5, 2025
70d2eb0
migrate to useResponsiveLayoutOnWideRHP on wide RHP components and sm…
collectioneur Dec 5, 2025
2e635fc
change to three const sets of wide RHP and refactor places where they…
collectioneur Dec 5, 2025
a943a74
Add variables.popoverMargin
WojtekBoman Dec 8, 2025
d57f6d7
Cleanup super wide rhp code
WojtekBoman Dec 8, 2025
85d0044
Handle EXPENSE_REPORT when start open report span
WojtekBoman Dec 8, 2025
219b793
Fix opening multiple expense reports
WojtekBoman Dec 9, 2025
732b590
Fix navigating back from ReportScreen to super wide/wide rhp
WojtekBoman Dec 9, 2025
ba05195
Rename dismissToFirstRHP to dismissToPreviousRHP
WojtekBoman Dec 9, 2025
799f54e
Fix ESLint
WojtekBoman Dec 9, 2025
1124843
Fix perf tests
WojtekBoman Dec 9, 2025
6c3fab3
Refactor synchronization rhp keys in ModalStackNavigators.tsx
WojtekBoman Dec 10, 2025
834c72c
Remove Expensicons from MoneyRequestReportTransactionList and SplitEx…
WojtekBoman Dec 10, 2025
9c476b8
add specific case to parent subtitle, when super wide rhp is opened w…
collectioneur Dec 10, 2025
08a2d08
Fix React compiler check
WojtekBoman Dec 11, 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 @@ -85,6 +85,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
5 changes: 2 additions & 3 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,7 @@ const SCREENS = {
TRAVEL: 'Travel',
SEARCH_REPORT: 'SearchReport',
SEARCH_REPORT_ACTIONS: 'SearchReportActions',
// These two routes will be added in a separate PR adding Super Wide RHP routes
EXPENSE_REPORT: 'ExpenseReport',
SEARCH_MONEY_REQUEST_REPORT: 'SearchMoneyRequestReport',

SEARCH_ADVANCED_FILTERS: 'SearchAdvancedFilters',
SEARCH_SAVED_SEARCH: 'SearchSavedSearch',
SETTINGS_CATEGORIES: 'SettingsCategories',
Expand All @@ -274,8 +271,10 @@ const SCREENS = {
MERGE_TRANSACTION: 'MergeTransaction',
REPORT_CARD_ACTIVATE: 'Report_Card_Activate',
DOMAIN: 'Domain',
EXPENSE_REPORT: 'ExpenseReport',
},
REPORT_CARD_ACTIVATE: 'Report_Card_Activate_Root',
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: 11 additions & 7 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import usePermissions from '@hooks/usePermissions';
import usePolicy from '@hooks/usePolicy';
import useReportIsArchived from '@hooks/useReportIsArchived';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useResponsiveLayoutOnWideRHP from '@hooks/useResponsiveLayoutOnWideRHP';
import useSearchShouldCalculateTotals from '@hooks/useSearchShouldCalculateTotals';
import useSelectedTransactionsActions from '@hooks/useSelectedTransactionsActions';
import useStrictPolicyRules from '@hooks/useStrictPolicyRules';
Expand All @@ -44,7 +45,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 @@ -151,7 +152,6 @@ import ProcessMoneyReportHoldMenu from './ProcessMoneyReportHoldMenu';
import {useSearchContext} from './Search/SearchContext';
import AnimatedSettlementButton from './SettlementButton/AnimatedSettlementButton';
import Text from './Text';
import {WideRHPContext} from './WideRHPContextProvider';

type MoneyReportHeaderProps = {
/** The report currently being looked at */
Expand Down Expand Up @@ -192,7 +192,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 @@ -387,9 +387,11 @@ function MoneyReportHeader({
const shouldCalculateTotals = useSearchShouldCalculateTotals(currentSearchKey, currentSearchQueryJSON?.similarSearchHash, true);
const [currentSearchResults] = useOnyx(`${ONYXKEYS.COLLECTION.SNAPSHOT}${currentSearchQueryJSON?.hash}`, {canBeMissing: true});

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

const {isWideRHPDisplayedOnWideLayout, isSuperWideRHPDisplayedOnWideLayout} = useResponsiveLayoutOnWideRHP();

const shouldDisplayNarrowMoreButton = !shouldDisplayNarrowVersion || isWideRHPDisplayedOnWideLayout || isSuperWideRHPDisplayedOnWideLayout;

const showExportProgressModal = useCallback(() => {
return showConfirmModal({
Expand Down Expand Up @@ -1417,7 +1419,9 @@ function MoneyReportHeader({
const backToRoute = route.params?.backTo ?? (chatReport?.reportID ? ROUTES.REPORT_WITH_ID.getRoute(chatReport.reportID) : undefined);
Navigation.goBack(backToRoute);
}
handleDeleteTransactions();
// It has been handled like the rest of the delete cases. It will be refactored along with other cases.

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.

Could you add a link to the issue that handles this refactoring?

// eslint-disable-next-line @typescript-eslint/no-deprecated
InteractionManager.runAfterInteractions(() => handleDeleteTransactions());

@ZhenjaHorbach ZhenjaHorbach Dec 8, 2025

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.

Can we try to use Navigation.setNavigationActionToMicrotaskQueue instead InteractionManager.runAfterInteractions to not add eslint-disable-next-line every time?

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.

Unfortunately, we already tried several approaches to remove InteractionManager, but in this case, it is the only option that works well without bugs. Other similar functions in the application also currently rely on InteractionManager. Navigation.setNavigationActionToMicrotaskQueue doesn't work either, as we must wait for the animation to end, not just the completion of all tasks.

});
}, [showConfirmModal, translate, selectedTransactionIDs.length, transactions, handleDeleteTransactions, route.params?.backTo, chatReport?.reportID]);

Expand Down Expand Up @@ -1587,7 +1591,7 @@ function MoneyReportHeader({
{isReportInSearch && (
<MoneyRequestReportNavigation
reportID={moneyRequestReport?.reportID}
shouldDisplayNarrowVersion={shouldDisplayNarrowVersion}
shouldDisplayNarrowVersion={!shouldDisplayNarrowMoreButton}
/>
)}
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import useParentReportAction from '@hooks/useParentReportAction';
import usePrevious from '@hooks/usePrevious';
import useReportIsArchived from '@hooks/useReportIsArchived';
import useReportScrollManager from '@hooks/useReportScrollManager';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useResponsiveLayoutOnWideRHP from '@hooks/useResponsiveLayoutOnWideRHP';
import useSelectedTransactionsActions from '@hooks/useSelectedTransactionsActions';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
Expand Down Expand Up @@ -172,7 +172,7 @@ function MoneyRequestReportActionsList({
const isReportArchived = useReportIsArchived(reportID);
const canPerformWriteAction = canUserPerformWriteAction(report, isReportArchived);

const {shouldUseNarrowLayout} = useResponsiveLayout();
const {shouldUseNarrowLayout} = useResponsiveLayoutOnWideRHP();

const [session] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false});
const [offlineModalVisible, setOfflineModalVisible] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import TransactionItemRow from '@components/TransactionItemRow';
import useAnimatedHighlightStyle from '@hooks/useAnimatedHighlightStyle';
import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useResponsiveLayoutOnWideRHP from '@hooks/useResponsiveLayoutOnWideRHP';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import ControlSelection from '@libs/ControlSelection';
Expand Down Expand Up @@ -84,7 +85,8 @@ function MoneyRequestReportTransactionItem({
const {translate} = useLocalize();
const styles = useThemeStyles();
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {isSmallScreenWidth, isMediumScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();
const {isSmallScreenWidth, isMediumScreenWidth} = useResponsiveLayout();
const {shouldUseNarrowLayout} = useResponsiveLayoutOnWideRHP();
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,6 @@ import {View} from 'react-native';
import type {TupleToUnion} from 'type-fest';
import ButtonWithDropdownMenu from '@components/ButtonWithDropdownMenu';
import Checkbox from '@components/Checkbox';
import * as Expensicons from '@components/Icon/Expensicons';
import MenuItem from '@components/MenuItem';
import Modal from '@components/Modal';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
Expand All @@ -22,6 +21,7 @@ import useMobileSelectionMode from '@hooks/useMobileSelectionMode';
import useOnyx from '@hooks/useOnyx';
import useReportIsArchived from '@hooks/useReportIsArchived';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useResponsiveLayoutOnWideRHP from '@hooks/useResponsiveLayoutOnWideRHP';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import {turnOnMobileSelectionMode} from '@libs/actions/MobileSelectionMode';
Expand Down Expand Up @@ -167,7 +167,8 @@ function MoneyRequestReportTransactionList({
const expensifyIcons = useMemoizedLazyExpensifyIcons(['Location'] as const);
const {translate, localeCompare} = useLocalize();
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {shouldUseNarrowLayout, isSmallScreenWidth, isMediumScreenWidth} = useResponsiveLayout();
const {isSmallScreenWidth, isMediumScreenWidth} = useResponsiveLayout();
const {shouldUseNarrowLayout} = useResponsiveLayoutOnWideRHP();
const {markReportIDAsExpense} = useContext(WideRHPContext);
const [isModalVisible, setIsModalVisible] = useState(false);
const [selectedTransactionID, setSelectedTransactionID] = useState<string>('');
Expand All @@ -185,6 +186,8 @@ function MoneyRequestReportTransactionList({
const [reportLayoutGroupBy] = useOnyx(ONYXKEYS.NVP_REPORT_LAYOUT_GROUP_BY, {canBeMissing: true});
const shouldShowGroupedTransactions = isExpenseReport(report) && !isIOUReport(report);

const icons = useMemoizedLazyExpensifyIcons(['CheckSquare'] as const);

const addExpenseDropdownOptions = useMemo(
() => getAddExpenseDropdownOptions(expensifyIcons, report?.reportID, policy, undefined, undefined, lastDistanceExpenseType),
[report?.reportID, policy, lastDistanceExpenseType, expensifyIcons],
Expand Down Expand Up @@ -635,7 +638,7 @@ function MoneyRequestReportTransactionList({
>
<MenuItem
title={translate('common.select')}
icon={Expensicons.CheckSquare}
icon={icons.CheckSquare}
onPress={() => {
if (!isMobileSelectionModeEnabled) {
turnOnMobileSelectionMode();
Expand Down
Loading
Loading