fix: resolve deploy blockers and add hover/tooltip to receipt action buttons#84497
Conversation
…Multiple-Receipts-to-Be-Attached-to-a-Single-Expense
|
@ahmedGaber93 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…Multiple-Receipts-to-Be-Attached-to-a-Single-Expense
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp20260316214029107.mp420260316213920573.mp4Android: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari20260316203940082.mp420260316204408887.mp420260316204449780.mp4 |
…Multiple-Receipts-to-Be-Attached-to-a-Single-Expense
…Multiple-Receipts-to-Be-Attached-to-a-Single-Expense
…Multiple-Receipts-to-Be-Attached-to-a-Single-Expense
…rst-upload hover detection
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
…Multiple-Receipts-to-Be-Attached-to-a-Single-Expense # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…Multiple-Receipts-to-Be-Attached-to-a-Single-Expense
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @puneetlath 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/puneetlath in version: 9.3.41-0 🚀
Bundle Size Analysis (Sentry): |
|
Hi @TaduJR. QA team failed this PR with this original issue 1773956892982.Recording__1872.mp4 |
|
Hmm not able to repo on my side. Could you please create an issue for it with the attachment you used to repo if possible? Thanks! |
|
Don't forget to tag me there. |
|
Deploy Blocker #85953 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.41-4 🚀
|


Explanation of Change
Fixes 5 deploy blockers and 1 additional deploy blocker found during QA of the receipt action buttons (Add Receipt + Enlarge) introduced in the original PR #83994:
Buttons don't appear after hovering during image load ([Due for payment 2026-03-30] Web - Expense - Buttons do not appear when hovering over receipt while it is loading #84354) — Added
isMouseInsideRefto track mouse position independently of hover state. WhenisLoadingtransitions tofalse, auseEffectre-triggersonMouseEnterif the mouse is still inside the receipt area, so buttons appear without requiring the user to move the mouse out and back in.Blue focus ring on enlarge button after pressing ESC ([Due for payment 2026-03-30] Web - Expense - Full screen button has blue border after closing receipt view with ESC key #84355) — Replaced
PressableWithoutFeedbackwithPressableWithoutFocuson the enlarge button and addedstyles.noOutline.PressableWithoutFocuscallsblur()on press, preventing the browser's default focus ring from persisting after the receipt modal is closed with ESC.No error modal for oversized/invalid attachments ([Due for payment 2026-03-30] Expense - No error modal when sending large attachment from receipt button #84356) — Integrated
useFilesValidationhook (same pattern used byReportActionCompose) to validate file size, type, and PDF password protection beforeuploading. Added
acceptedFileTypesrestriction toAttachmentPickerso the OS file dialog pre-filters to valid receipt extensions. RendersAttachmentErrorModalandPDFValidationComponentfor user feedback.Report doesn't scroll down after adding attachment ([Due for payment 2026-03-30] Expense - Report does not scroll down after sending attachment #84359) — Changed
notifyReportIDfrommoneyRequestReport?.reportID ?? report.reportIDtoreport.reportID. The attachment is posted to the transaction thread(
report), so that's the report that needs the scroll-to-bottom notification — not the parent IOU report.Buttons persist without hover on touchscreen laptops ([Due for payment 2026-03-30] Chat Report View - Enlarge and plus buttons on receipt image persist without hover #84388) — Replaced
canUseTouchScreen()withhasHoverSupport()in bothuseHover.tsandMoneyRequestReceiptView.tsx.canUseTouchScreen()checksnavigator.maxTouchPoints > 0which returnstrueon touchscreen laptops (e.g., Lenovo Flex 5i) even though they have a mouse — blocking hover state updates entirely.hasHoverSupport()uses CSS media query(hover: hover) and (pointer: fine)which correctly identifies hover capability regardless of touch presence.Button icons hard to see when PDF receipt added offline ([Due for payment 2026-03-30] Android - Expense - Button icons are hard to see when PDF receipt is added offline #84367) — Used
shouldDisableOpacityonOfflineWithFeedbackto prevent blanketopacity: 0.5from fading the action buttons when offline. AppliedofflineFeedbackPendingstyle manually to just the receipt image wrapper, so the image correctly fades while buttons remain at full opacity and usable.Fixed Issues
$ #84354
$ #84355
$ #84356
$ #84359
$ #84388
$ #84367
PROPOSAL:
Tests
Prerequisite: Create an expense with a receipt in a workspace chat and open the expense.
#84354 — Buttons appear after hovering during image load:
#84355 — No blue focus ring on enlarge button after ESC:
#84356 — Error modal for oversized/invalid attachments:
#84359 — Report scrolls down after adding attachment:
#84388 — Buttons show/hide on hover (touchscreen laptop):
#84367 — Button icons visible when PDF receipt added offline:
Tooltip and hover on receipt action buttons:
1. Open an expense with a receipt
2. Hover over the receipt image
3. Verify the add and enlarge buttons appear
4. Hover over the add (+) button
5. Verify a tooltip "Add additional receipt" appears and the button has a hover background
6. Hover over the enlarge button
7. Verify a tooltip "Expand" appears and the button has a hover background
8. Move the mouse away from the receipt
9. Verify the tooltips disappear and buttons hide
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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-Native.mp4
Android: mWeb Chrome
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-Safari.mp4
MacOS: Chrome / Safari
Mac-Chrome.mp4