feat: render high-res PDF overlay on receipt hover zoom#93583
feat: render high-res PDF overlay on receipt hover zoom#93583WojtekBoman wants to merge 1 commit into
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
2f6ce38 to
cca40dd
Compare
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
@madmax330 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: cca40dd454
ℹ️ 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".
|
@WojtekBoman can you update the fixed issue and assign the c+ for review? |
|
|
||
| const TRANSPARENT_BACKGROUND = {backgroundColor: 'transparent'} as const; | ||
|
|
||
| const {HOVER_ZOOM_SCALE} = CONST.RECEIPT; |
There was a problem hiding this comment.
Do we need this format? 😅
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
| * amount + waypoints) should be shown. A merged distance expense can be typed `distance-manual` yet | ||
| * still carry waypoints, so the presence of waypoints keeps those included. | ||
| */ | ||
| function isMapBasedDistanceRequest(transaction: OnyxEntry<Transaction>): boolean { |
There was a problem hiding this comment.
Let's add tests for this
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
cca40dd to
024c390
Compare
024c390 to
5360569
Compare
|
@mountiny @ZhenjaHorbach All comments have been resolved! |
Explanation of Change
PDF receipts are served as low-resolution JPG thumbnails by the server. When hover-zoomed, these thumbnails blur because the zoom is applied to an upscaled raster. This PR adds
ReceiptZoomablePDF— a web-only component that renders the actual PDF at 2.5× its on-screen size (then scales it back down with CSS), so the hover-zoom layer reveals real PDF pixels. A native no-op stub keeps bundling clean.HOVER_ZOOM_SCALEis extracted toCONST.RECEIPTso both components share the value.Screen.Recording.2026-06-15.at.14.50.47.mov
Fixed Issues
$ #93627
PROPOSAL:
Tests
Offline tests
This component fetches the PDF via the server URL. Offline behavior is covered in test 2 above: when the PDF URL is unreachable,
onLoadErrorfires,hasFailedis set totrue, andReceiptZoomablePDFrendersnull, revealing the pre-loaded JPG thumbnail underneath. No new Onyx writes are involved.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