Keep the background expense receipt visible when a wide RHP opens#96142
Open
KJ21-ENG wants to merge 2 commits into
Open
Keep the background expense receipt visible when a wide RHP opens#96142KJ21-ENG wants to merge 2 commits into
KJ21-ENG wants to merge 2 commits into
Conversation
The receipt was hidden on every MoneyRequestView whenever any wide RHP was open, so a report hyperlink opening a wide RHP over a central-pane expense view (since Expensify#95131) dropped the background receipt and shifted content up. Scope the check to the view's own route key so only the MoneyRequestView inside the wide RHP hides its inline receipt.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@cretadn22 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
7 tasks
Contributor
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
joekaufmanexpensify
approved these changes
Jul 15, 2026
joekaufmanexpensify
left a comment
Contributor
There was a problem hiding this comment.
Good for product
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
MoneyRequestViewhides its inline receipt while a wide RHP is open so the receipt is not duplicated next to the wide RHP's left receipt panel. That condition checkedwideRHPRouteKeys.length === 0, which is global: once any wide RHP registers, every mountedMoneyRequestViewhides its receipt — including instances on screens behind the RHP. After #95131, report hyperlinks can open a wide RHP over a central-pane expense view, so the background expense view loses its receipt box and its content shifts up (the regression from #95131 reported in the linked issue).This PR scopes the condition to the view's own screen: the receipt is hidden only when the view's
route.keyis registered inwideRHPRouteKeys(!wideRHPRouteKeys.includes(route.key)instead ofwideRHPRouteKeys.length === 0). TheMoneyRequestViewinside the wide RHP keeps hiding its inline receipt (the wide RHP's left panel shows it), while instances mounted on other screens — such as the central report pane behind the RHP — keep their inline receipt. The small-screen, review-duplicates, and merge-transaction short-circuits are unchanged.A unit test (
tests/ui/MoneyRequestViewReceiptTest.tsx) locks the behavior: it asserts the inline receipt stays visible on a background report screen while another screen owns the wide RHP (this assertion fails against the pre-fix global check), and that the view owning the wide RHP still hides its inline receipt.cc @blimpich
Fixed Issues
$ #96118
PROPOSAL: #96118 (comment)
Tests
Offline tests
This is a render-only condition fix in
MoneyRequestView; it does not alter optimistic data, queued requests, or API behavior. Offline check: with the network off, create/scan an expense so its transaction carries a pending receipt, then open a wide RHP over an unrelated report showing that pending receipt on a background screen. Verify the pending receipt stays visible on the background view with the correct grayed offline styling, and going back online settles without the receipt flashing or disappearing.QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-07-15.at.1.19.39.PM-compressed.mp4