Repository navigation
[Odometer] Image preview - #80532
[Odometer] Image preview#80532Julesssss merged 42 commits into
Conversation
…pture_flow' into jakubkalinski0/Odometer_Image_Preview
|
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 |
…pture_flow' into jakubkalinski0/Odometer_Image_Preview
…pture_flow' into jakubkalinski0/Odometer_Image_Preview
|
@shawnborton While I am waiting for merge on the previous PR I'm polishing this one for review. Any remarks on the image preview here? output.mp4 |
|
Only minor feedback I have is that I think we can simplify the modal titles to simply say "Odometer start" instead of "Odometer start photo". Same with "Odometer end" Thoughts @Expensify/design @jamesdeanexpensify ? |
|
The UI looks correct though. |
|
Yup—looking pretty good to me. Agree with your copy edits! |
|
This sounds good to me! |
|
Done! Screen.Recording.2026-02-10.at.19.18.09.mov |
|
Dang, actually sorry, can we add the |
|
Well the question is where do we want this |
|
If you don't mind @shawnborton - are you cool including |
|
That's fine by me! Figured we might be able to tighten it up a bit but happy to keep it there. |
|
Thank you sir! |
| }); | ||
| } | ||
|
|
||
| function revokeOdometerImageUri(image: FileObject | string | null | undefined, nextImage?: FileObject | string | null): void { |
There was a problem hiding this comment.
@jakubkalinski0 If this is necessary, I think we might already have a similar function somewhere in the codebase. Could you see how we did in receipts in the manual request flow?
There was a problem hiding this comment.
I will look into it
There was a problem hiding this comment.
I checked the manual request flow and couldn’t find an existing shared helper for this. In receipts we create blob URLs in the step components and store them via setMoneyRequestReceipt but we don’t centrally revoke them on replace/remove (setMoneyRequestReceipt, removeTransactionReceipt and detachReceipt only update Onyx). So this revokeOdometerImageUri helper is new behavior not a duplicate of an existing utility.
There was a problem hiding this comment.
Thanks for confirming. I'm going to move forward here and we can discuss further in our dm chat if @DylanDylann has a further thought here.
|
Tested and works well |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 @Julesssss 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.3.18-0 🚀
|
|
This PR is failing because of issue ##82327 The issue is reproducible in: Android IOS |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.18-8 🚀
|
Explanation of Change
This PR implements the “odometer image preview” portion of the odometer flow. The main goal is to let users tap the start/end image thumbnail and open a proper preview modal with replace/download/delete actions.
reportIDand usesimageTypeto match how receipt routes are composed (action/iouType segments).imageType, selecting the appropriate local file, and exposing replace/delete actions with odometer‑specific copy. This lets users view, download, replace, or remove the start/end photo.Fixed Issues
$ #77266
PROPOSAL: N/A
Tests
"FAB"-> press"Track distance"-> select the"Odometer"tab.“Odometer start”title and the correct image displayed."Download"and verify that the image was downloaded properly.“Replace”and verify it navigates to the odometer image capture screen, then select a new file and verify the thumbnail updates properly without anything missing.“Delete odometer photo”and confirm that the image was properly deleted -> the preview should close + verify the thumbnail clears properly without anything missing.Offline tests
TestsQA Steps
Same as Tests, this feature requires the
odometerExpensesbeta -- let @Julesssss know if you have any problems herePR 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
MacOS: Chrome / Safari
online:
online1.mp4
offline:
offline1.mp4