Fix receipt full-res image not loading when preview displaces it in flow - #100423
Fix receipt full-res image not loading when preview displaces it in flow#100423neerajbachani wants to merge 1 commit into
Conversation
|
@neerajbachani Could you restore the behavior that was reverted due to the issue? Since the issue is fixed now, please restore it together with the fix in this PR. |
…transition UX Position the preview out of flow so the full-resolution image is not pushed below the clipped receipt box on web. Revert the Expensify#98668 isThumbnailLoading workaround and restore Expensify#97313's dim preview and spinner tied to isLoading now that full-res onLoad fires reliably.
8ec0490 to
9de0979
Compare
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-09-06.at.15.16.58.movAndroid: mWeb ChromeScreen.Recording.2026-09-06.at.15.14.51.moviOS: HybridAppScreen.Recording.2026-09-06.at.15.19.51.moviOS: mWeb SafariScreen.Recording.2026-09-06.at.15.21.17.movMacOS: Chrome / SafariScreen.Recording.2026-09-06.at.15.09.25.mov |
Screen.Recording.2026-09-06.at.13.08.36.mov@neerajbachani Could you check why the spinner is still showing and never disappears when the report is empty in this PR? |
|
@huult I checked this on upstream My PR diff vs main is only the preview style line ( Could you verify on your side that we’re seeing the same thing on main? If we’re aligned, I’ll investigate that separately and can open a dedicated PR for it — keeping this PR scoped to the #99199 layout fix. |
Screen.Recording.2026-09-06.at.13.35.31.mov@neerajbachani Yes, I can reproduce it on staging, so I can confirm that it is not related to this PR and should be tracked as a separate issue. Thanks for checking! I posted it in Slack. |
|
@huult Found and fixed the infinite spinner on empty workspace chat (separate from the receipt issue in #100423). Root cause Screen.Recording.2026-09-06.at.11.45.09.AM.online-video-cutter.com.mp4Fix Verified locally with your exact repro (clear cache → reopen workspace chat): Screen.Recording.2026-09-06.at.12.32.04.PM.online-video-cutter.com.mp4@flaviadefaria since this is a distinct bug from #99199, I'd like to open a dedicated PR for it and keep #100423 scoped to the receipt fix only. Good to proceed? |
Explanation of Change
While
isLoadingis true,ImageWithLoadingrenders the low-res preview and full-res image as two in-flow siblings inside a clipped receipt container. On web, the preview pushes the full-res<img>below the visible box, so lazy loading never decodes it,onLoadnever fires, and the receipt can stay on the blurry preview or show an infinite spinner.This change positions the preview absolutely so it overlays the receipt box instead of displacing the full-res image. The full-res image remains the only in-flow child, stays inside the clip rect, and loads normally with
loading="lazy"unchanged.Fixed Issues
$ #99199
PROPOSAL: #99199 (comment)
Tests
Offline tests
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-09-05.at.12.21.54.AM.online-video-cutter.com.mp4