App icon indicating copy to clipboard operation
App copied to clipboard

[Due for payment 2026-06-30] Add stop address editing for GPS mileage

Open JmillsExpensify opened this issue 8 months ago • 60 comments

Problem When an employee creates a GPS mileage expense, if the recorded trip has an inaccurate stop destination (e.g., forgot to stop), then they have to recreate the expense using manual mileage or a re-drawn map route, which is harder to reproduce accurately and provides weaker supporting documentation for approvers and auditors.

Solution In one release, we will:

  • Make the stop address a push row
  • Show an “Edit stop” page, with a map and a slider below
  • Users can drag the slider to decrease the distance, which is animated on the map
  • Where ever the users stops the slider and confirms, we save that stop address when creating the expense (and updating the mileage receipt).
Image

Further details

  • We'll start saving GPS way points in the BE, which means storing the gpsCoordinates in the commentNVPs (where we currently store existing distance data like routeImageURL and odometer readings).
  • We'll also start saving any mileage decreases via modifiedDistance, similar to modifiedCreated, modifiedAmount, modifiedMerchant and modifiedMCC.

This is an internal initiative, so we won't open it up to proposals

Issue OwnerCurrent Issue Owner: @dominictb

JmillsExpensify avatar Mar 19 '26 12:03 JmillsExpensify

Triggered auto assignment to Design team member for new feature review - @dannymcclain (NewFeature)

melvin-bot[bot] avatar Mar 19 '26 12:03 melvin-bot[bot]

This issue has not been updated in over 15 days. @JmillsExpensify, @shawnborton, @AndrewGable, @GCyganek eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

melvin-bot[bot] avatar Apr 13 '26 21:04 melvin-bot[bot]

Moved back to weekly as we don't want this monthly

dylanexpensify avatar Apr 16 '26 11:04 dylanexpensify

I have the implementation pretty much ready, but it depends on https://github.com/Expensify/App/pull/88609 that should be switched to review soon (when the related backend PR is deployed to prod), so I'll post a PR when it's merged. We will also have to wait for a backend update to be able to generate receipts with modified stop

GCyganek avatar Apr 30 '26 07:04 GCyganek

@Expensify/design I'm working on applying the new route line + icons designs:

  1. Should I be using assets exported directly from here to get the icons? https://www.figma.com/design/yaFFb7MH1mGeOr79a1wSWH/GPS-Milage-Tracking?node-id=463-737
  2. We currently use dot-indicator icon for waypoints between start & end and dot-indicator-unfilled for the start waypoint, but on the design there is only a new version for dot-indicator, so I'm wondering if you want me to use it for every waypoint apart from the end waypoint?

See what I currently have:

Image Image Image

I will want to post a PR for the map style update after we merge the "Add stop address editing" PR

GCyganek avatar May 10 '26 18:05 GCyganek

I'll let @shawnborton talk to the points here and export as if you export directly from Figma yourself then you'll get some weird stuff sadly so we usually bring it through Illustrator. I think it makes sense to have these as separate icons as they're specific to the basemap.

dubielzyk-expensify avatar May 11 '26 00:05 dubielzyk-expensify

I think we recently landed on this as the new marker/line design (sorry for the back and forth, you know how it goes here!)

Image

(Figma)

shawnborton avatar May 11 '26 07:05 shawnborton

As for the "stops" - I agree we should probably do something different than the start and finish points. Would one of these make sense? cc @Expensify/design for thoughts

Image

shawnborton avatar May 11 '26 07:05 shawnborton

@GCyganek in Figma, I am adding a drop shadow to these markers:

Image

How do you want these exported? As PNGs with the shadow? As SVGs with no shadow and you add that via styles?

shawnborton avatar May 11 '26 07:05 shawnborton

As for the "stops" - I agree we should probably do something different than the start and finish points. Would one of these make sense? cc @Expensify/design for thoughts

I think maybe the last one given the first one is too close to current location/start (though I think it's more obvious as stops). Also, how does the polyline + start + stops look with the current location? If we're changing this across the board we need to have it so start and current location can show at the same time without looking the same. Just dawned on me.

Here's how it looks today. The blue dot being my location and the gray outline being start:

Image

dubielzyk-expensify avatar May 11 '26 07:05 dubielzyk-expensify

Yeah, those are great points. So that makes me wonder if we should reserve blue for just being your current location, all other points would be green?

Image

shawnborton avatar May 11 '26 08:05 shawnborton

@shawnborton I'll be able to export the icons myself as I did yesterday, just wanted a confirmation that if I export it directly from the Figma desing it's fine. SVGs work fine and that's what we currently use for map markers and I just checked it gets exported with working drop shadow already, although it's barely visible because of the low opacity set. I'll use whatever you decide is best in the end

GCyganek avatar May 11 '26 08:05 GCyganek

I think it's better if we export them because then we run them through Illustrator to make sure all of the bounding boxes are good.

If we export without shadows, can you add them afterwards? That might make the sizes of the markers cleaner instead of needing huge images to account for the shadow blurs.

shawnborton avatar May 11 '26 08:05 shawnborton

@shawnborton I just checked and adding drop shadow (outside the view box) to the icon without shadow would work, but only on web, iOS and Android have problems and do not show the shadow that is outside of the view box. It would be simplest to have a view box that holds both the icon and the shadow. I can also try to add the shadow manually to the icon exported without shadow and adjust the viewbox size to keep both in it

But maybe you already have experience with how to handle icons with shadows in Expensify and know best what to do here? I searched if we have any svg with a shadow but couldn't find any

GCyganek avatar May 11 '26 09:05 GCyganek

Hmm even then, I am having trouble getting the shadow to export with the svg... so perhaps we need PNGs here?

shawnborton avatar May 11 '26 09:05 shawnborton

If you wanna try PNG approach: Points.zip

48x48 for the big rounds

Image

48x53 for the stop

Image

16x16 for the small stops:

Image

shawnborton avatar May 11 '26 09:05 shawnborton

Hmm even then, I am having trouble getting the shadow to export with the svg... so perhaps we need PNGs here?

Hmm I just tried this exporting as svg like this:

Image

And it has the shadow, it's just that because it has 0.06 opacity it's barely visible, but it's there:

https://github.com/user-attachments/assets/773a75b8-29cf-4e5e-b751-0f78786451af

GCyganek avatar May 11 '26 10:05 GCyganek

Got it, well I say go ahead and try your exports and we'll see how it goes?

shawnborton avatar May 11 '26 10:05 shawnborton

Ok, I'll try with exported svgs and show you the results

GCyganek avatar May 11 '26 10:05 GCyganek

@AndrewGable could you please assign me to this issue? I can help review the PRs since I'm the reviewer of the GPS project

dukenv0307 avatar May 13 '26 03:05 dukenv0307