App: [HOLD for payment 2022-03-02] [$250] Add the ability to configure the distance tracking `rate` and `unit` on the Free Plan

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Deliverables

  1. Update the Reimburse receipts workspace page to be titled Reimburse expenses instead

image

  1. Add a new sub-section to the reimburse expenses page with the header Track distance and the copy: Set the per mile/km rate and choose a default unit to track.
  2. Add the Rate field to allow for the rate to be changed by calling the command Policy_CustomUnit_Update
  3. Add the Unit dropdown to be able to track distance in Miles (default) or Kilometers and allow for it to be changed by calling the command Policy_CustomUnitRate_Update

image

Platform:

New feature, to be available on all platforms.

Notes/Photos/Videos: Added in-line above. Here is the SVG asset for the car icon: GPS Track.svg.zip Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/181768 Issue reported by: trjexpensify Slack conversation: https://expensify.slack.com/archives/C03U7DCU4/p1634665726096500 Upwork URL: https://www.upwork.com/jobs/~01143e8c4bd3284e03 View all open jobs on GitHub

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 71 (67 by maintainers)

Most upvoted comments

Hey Mark! This is definitely one of the most requested enhancements to the free plan at the moment, so it would be great if we could square this away please.

I think it might be weird if you can select the entire value to copy/paste but can’t backspace to also delete it. So with that, I’d probably lean towards not making it selectable?

Yeah, I agree. Let’s start with this. Will create an issue.

Hmm yeah, that’s a bit tricky to handle but I agree it will be necessary. As the BigNumberPad doesn’t use a TextInput we have been able to use an alternate solution up to now (create a Unique Text Component for the currency symbol) – but applying that solution to regular TextInputs isn’t simple.

I wonder if we should create an external issue for creating a pre-fixable TextInput component, which allows users to copy only the numerical value. We need to decide first whether the symbol should be selectable or not via copy/paste, because that will drive the eventual solution.

Hi @deetergp, if this is a priority, I will do this over this weekend. I think I have all the info.

For the svg icon, maybe we need to manually scale down to 80x80 and then re-export from there? cc @michelle-thompson - I took a look at the other product illustrations and looks like they were exported at 80x80

@marktoman Let’s do it!

  1. Straight steps:
  • Add functions to API.js that will call the requested commands over the network.
  • Add functions, likely to User.js that will call those APIs, handle errors and potentially merge with Onyx.
  • Add two components to WorkspaceReimburseNoVBAView for Unit and Rate representation according to the image.
  • Bind the change methods to call the update functions we added earlier to send changed values over the network
  • Add the requested strings in en.js with the requested keys. Use translate when reading them.
  • Style the two view components according to the requested image in styles.js.
  • Add a new icon to components/Icon/Illustrations
  1. No issues expected given it is an addition (well seen in the diffs).

Proposal

I get 404 on the car icon, so a rocket will have to do for now 😃

Desktop

https://user-images.githubusercontent.com/47689923/140427318-e4dce09d-06d0-4752-83d7-9c0d386dee88.mp4

Mobile

https://user-images.githubusercontent.com/47689923/140427928-c4b57159-e83e-4679-aa4f-2568665fe546.mp4

Diffs

image image image image image

Please note this is just a proposal. I would then have a question about categorization (User vs. Policy) and if to sync with Onyx.

@deetergp we triaged this one over here, so I’m going to move this one on to Upwork. 👍

Upwork job here: https://www.upwork.com/jobs/~01143e8c4bd3284e03