Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
2.99k stars 2.5k forks source link

[$250] Distance rates - Distance rate row is disabled after selecting an invalid rate #41595

Closed lanitochka17 closed 4 days ago

lanitochka17 commented 2 weeks ago

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


Version Number: 1.4.70-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

Expected Result:

App should allow user to reselect another distance rate when the distance rate is invalid

Actual Result:

The distance rate caret is gone after selecting an invalid rate, which means user cannot reselect another rate

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/ce173f06-937c-4a17-8ee9-6c07f06694b9

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01602fdea81c088caa
  • Upwork Job ID: 1787777798786043904
  • Last Price Increase: 2024-05-07
Issue OwnerCurrent Issue Owner: @abdulrahuman5196
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

lanitochka17 commented 2 weeks ago

@dylanexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

lanitochka17 commented 2 weeks ago

We think that this bug might be related to #wave-collect - Release 1

abzokhattab commented 2 weeks ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Distance Rate row shows "pending..." after selecting

What is the root cause of that problem?

we check !rate which resolves to true in case the rate is 0 https://github.com/Expensify/App/blob/895d37e6c51b5ca07873d1ebfc3d7417903ef9ac/src/libs/DistanceRequestUtils.ts#L120-L122 https://github.com/Expensify/App/blob/895d37e6c51b5ca07873d1ebfc3d7417903ef9ac/src/libs/DistanceRequestUtils.ts#L117-L119 https://github.com/Expensify/App/blob/895d37e6c51b5ca07873d1ebfc3d7417903ef9ac/src/libs/DistanceRequestUtils.ts#L140-L143

What changes do you think we should make in order to solve the problem?

instead of check if the rate doesn't exist (!rate), we should check for if it is null and or undefined (rate === null || rate === undefined)

melvin-bot[bot] commented 1 week ago

@dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

dylanexpensify commented 1 week ago

Could repro

melvin-bot[bot] commented 1 week ago

Job added to Upwork: https://www.upwork.com/jobs/~01602fdea81c088caa

melvin-bot[bot] commented 1 week ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External)

melvin-bot[bot] commented 1 week ago

@abdulrahuman5196, @dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

abdulrahuman5196 commented 5 days ago

Checking now

abdulrahuman5196 commented 5 days ago

@dylanexpensify I am unable to repro the issue.

https://github.com/Expensify/App/assets/46707890/d00caf03-43aa-4e7d-bec8-7112e11d2d6d