Add a map on the GPS screen that shows the trip live#87103
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@Expensify/design could you build and test to see if everything looks fine to you here? This PR only adds the map and current location tracking while the trip is in progress, edit flow will be added in a separate PR Screen.Recording.2026-04-03.at.17.54.07.movI have a few questions:
I asked 2 more questions here |
This sounds fine to me. |
It might make sense to move it directly above the Stop button?
We can keep the original designs for now, so no need to update these. We can come in later and do design tweaks to the shapes/icons/etc. cc @Expensify/design for a gut check. If we do update them, we should update them for EVERY single kind of map we have.
Yup, all good. |
I only changed line width from 7 to 8 px and opacity from 100% to 80% according to the design, current color is #03D47C (green400, where on the design it's green300) and it wasn't changed on this PR. I will restore the original line width and opacity and in case we won't to change it I'll do it on a separate PR |
|
Sounds good, thanks! Mostly just want to make sure the whole @Expensify/design is aligned on any new changes before we implement them. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e781005a39
ℹ️ 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".
|
@dukenv0307 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: 519d46898b
ℹ️ 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".
|
If we are down for a little style update, this is where my head is at: I could get down with any of those, with the latter 2 feeling the most legible. Feel free to tinker here. |
|
I don't feel strongly, I defer to you all. |
|
No super strong feelings—I think I somewhat prefer the all green? But I do admit that the latter two a probably more legible. Between those two, I think I like the green lines with blue markers better. |
|
I think I am in a similar boat. Time to call in... JUDGE JON 🔨 |
Yes, that's the plan! Only adding the map here and adjusting the layout. Next PRs will add pause/resume functionality, style update (discussed in comments above) and edit flow, current discard button will be replaced by the delete icon on the distance counter level as on the design next to the edit icon I'm currently working on fixing all remaining landscape mode bugs that were reported today by the QAs, after that I'll be back to working on the GPS features |
|
Oh I can get down with that, I dig it. Thoughts @GCyganek ? |
|
Wow yeah, that looks quite nice. |
|
No qualms from me! Looks good! 👍 |
|
Looks great! Will update map styles next week in a separate PR. |
|
Is this ready for final review then? |
|
@puneetlath yes, C+ approved |
| const styles = useThemeStyles(); | ||
| const {windowWidth} = useWindowDimensions(); | ||
|
|
||
| const {renderProductTrainingTooltip, shouldShowProductTrainingTooltip} = useProductTrainingContext(CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.GPS_TOOLTIP, !!isTracking); |
There was a problem hiding this comment.
FYI, we'll need to whitelist this on the back-end to make it dismissible there too.
There was a problem hiding this comment.
This component was only moved to a different directory, backend is already handled 😅
|
|
||
| if (!gpsDraftDetails?.startAddress?.value && !gpsDraftDetails?.endAddress?.value) { | ||
| // eslint-disable-next-line rulesdir/no-negated-variables | ||
| const tripNotInitialized = (gpsDraftDetails?.gpsPoints?.length ?? 0) === 0 && !gpsDraftDetails?.isTracking; |
There was a problem hiding this comment.
Boolean variable should start with "is". Perhaps something like
| const tripNotInitialized = (gpsDraftDetails?.gpsPoints?.length ?? 0) === 0 && !gpsDraftDetails?.isTracking; | |
| const isTripInitialized = (gpsDraftDetails?.gpsPoints?.length ?? 0) === 0 && !gpsDraftDetails?.isTracking; |
|
@GCyganek I accidentally hit approve, but one comment to address. And then I just want to confirm whether the back-end for the product training tooltip has been done. |
Backend is ready, I just moved the component to a different directory 😅 |
|
Ok great. |
|
🚧 @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! 🧪🧪
|
|
✋ 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/puneetlath in version: 9.3.60-0 🚀
Bundle Size Analysis (Sentry): |
|
I reviewed the changes in this PR against the help site articles under Conclusion: No help site changes are required. The two relevant articles are:
Both already accurately document the GPS distance tracking workflow. This PR adds visual/UI enhancements (live map during tracking, route layer ordering, user location dot, landscape mode support) but does not change any user-facing workflow steps, button labels, or feature behavior that the docs reference. The existing steps — Start → drive → Stop → review route → Create expense — remain correct as documented. |
|
Deploy Blocker #88041 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.60-22 🚀
|






Explanation of Change
Adds a map on the native GPS distance screen. Fixes map layers to draws the route below the user-location dot, updates user location using the latest GPS trip point, moves
GPSTooltipto be shown above the Start/Stop button. Makes sure that GPS screen works fine in landscape mode.Fixed Issues
$ #86026
PROPOSAL: N/A
Tests
Disabled location permissions:
With enabled location permissions:
In landscape mode:
Follow the scenarios above in the landscape mode and verify that the layout doesn't break and that the panel on the right with distance counter and waypoints is scrollable if needed
Offline tests
QA Steps
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
Screen.Recording.2026-04-07.at.14.37.08.mov
Screen.Recording.2026-04-07.at.14.40.50.mov
iOS: Native
Screen.Recording.2026-04-07.at.14.14.58.mov
Screen.Recording.2026-04-07.at.14.33.25.mov
Screen.Recording.2026-04-07.at.14.05.00.mov
No location permission defaults to San Francisco:
Screen.Recording.2026-04-07.at.14.35.57.mov
MacOS: Chrome / Safari
route drawn below the user location blue dot check: