feat: show full distance e-receipt on hover for map distance requests#92525
Conversation
fb5d8c4 to
863ed13
Compare
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚧 @shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Works great on my end :thu |
|
Works great on my end 👍 nice work! |
|
@QichenZhu 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 863ed13207
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR adds a desktop hover overlay for map-based distance receipts so reviewers can see the full distance e-receipt (map + amount + waypoints) inside the fixed receipt box (scaled to “contain”), matching Expensify Classic behavior.
Changes:
- Introduces
HoveredDistanceEReceiptto render a scaled, contained full distance e-receipt overlay. - Wires the overlay into
MoneyRequestReceiptViewbehindisMapDistanceRequest && hovered. - Adds an
eReceiptHoverFillstyle to ensure the overlay background matches the e-receipt panel (no visible gap around the scaled card).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/styles/index.ts | Adds a background fill style used by the hover overlay to match the distance e-receipt background. |
| src/components/ReportActionItem/MoneyRequestReceiptView.tsx | Renders the hover overlay for map distance receipts and introduces isMapDistanceRequest gating. |
| src/components/ReportActionItem/HoveredDistanceEReceipt.tsx | New component that measures the receipt box + e-receipt and scales the overlay to fit (“contain”). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const isDistanceRequest = isDistanceRequestTransactionUtils(transaction); | ||
| const isMapDistanceRequest = !!transaction && isDistanceRequest && !isManualDistanceRequest(transaction); |
There was a problem hiding this comment.
This comment is genuine.
Steps to reproduce:
- Create a map distance expense.
- Create a manual distance expense.
- Merge the 2nd expense into the 1st expense and select the 1st expense as the merchant to keep.
Expected result:
E-receipt displays on hover.
Actual result:
Only the map enlarges on hover.
Screen.Recording.2026-06-04.at.10.55.21.PM.mov
There was a problem hiding this comment.
Now it should work fine, I've added here logic checking if the transaction has defined waypoints, if so, we'll display an e-receipt
| @@ -623,23 +623,28 @@ function MoneyRequestReceiptView({ | |||
| isEnabled={canZoomReceipt} | |||
There was a problem hiding this comment.
E-receipts zoom on hover is intended
trjExpensify
left a comment
There was a problem hiding this comment.
Looks good to me too 👍
QichenZhu
left a comment
There was a problem hiding this comment.
Clicking the thumbnail doesn't open the receipt modal. Is this intentional?
92525.mov
No it should open the receipt modal. But the weird thing is the first time I clicked it, it worked as expected, but then after that first time, clicking did nothing. |
|
@QichenZhu @Expensify/design All comments have been resolved :) Feel free to generate new builds! |
|
🚧 @shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-06-09.at.12.37.02.AM.movAndroid: mWeb ChromeScreen.Recording.2026-06-09.at.12.39.18.AM.moviOS: HybridAppSimulator.Screen.Recording.-.iPhone.17.-.2026-06-09.at.00.36.12.moviOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.17.-.2026-06-09.at.00.38.40.movMacOS: Chrome / Safarimac-desktop-1.movmac-desktop-2.mov |
mountiny
left a comment
There was a problem hiding this comment.
@Expensify/design Please give it a look
|
Works well on my end 👍 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.1-0 🚀
Bundle Size Analysis (Sentry): |
Help site review — no docs changes requiredI reviewed the changes in this PR against the help site articles under Conclusion: No help site updates are needed. Why:
Because no documentation changes are required, I did not create a draft help site PR. @WojtekBoman, if you believe this hover behavior should be documented (or if I'm missing a customer-facing change), let me know and I'll draft the help site PR. |
|
Deploy Blocker #93001 was identified to be related to this PR. |
|
Deploy Blocker #93004 was identified to be related to this PR. |
|
Deploy Blocker #93010 was identified to be related to this PR. |
|
Ended up reverting so we can handle those edge cases in v2 |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.1-6 🚀
|
Explanation of Change
On hover over a map distance expense receipt, overlay the full distance e-receipt (map + amount + waypoints) scaled with object-fit:contain to fit the fixed receipt box without resizing it, matching Expensify Classic. Adds the
HoveredDistanceEReceiptcomponent, wires it intoMoneyRequestReceiptView(gated onisMapDistanceRequest && hovered), and a neweReceiptHoverFillstyle.Fixed Issues
$ #90793 (comment)
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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