Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$500] Request money - Distance - Next button enabled when map is pending - offline #27269

Closed
1 of 6 tasks
izarutskaya opened this issue Sep 12, 2023 · 29 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented Sep 12, 2023

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


Action Performed:

Make sure to have few waypoints already chosen in distance pages.

  1. disconnect the internet/force offline
  2. fab button ->request money-> distance
  3. choose start and end waypoints from suggested addresses. ( make sure you have them already, if not go online try picking waypoints and then again start from step 1)
  4. Noitce that map is pending, but next button is enabled.
  5. click next, share to some workspace
  6. Notice that amount is calculated as 0.

Expected Result:

On Pending maps, Next button should be disabled. On enabling the button, distance is calculated as 0, and user can make requests too.

Actual Result:

Next button enabled when map is pending

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.68-12

Reproducible in staging?: Y

Reproducible in production?: Y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-09-08.at.11.01.22.PM.mov
Screen_Recording_20230912_192005_New.Expensify.mp4

Expensify/Expensify Issue URL:

Issue reported by: @ashimsharma10

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694193245534799

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d98cf61c3038fc39
  • Upwork Job ID: 1701634856737542144
  • Last Price Increase: 2023-09-26
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Triggered auto assignment to @sophiepintoraetz (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@izarutskaya izarutskaya added the External Added to denote the issue can be worked on by a contributor label Sep 12, 2023
@melvin-bot melvin-bot bot changed the title Request money - Distance - Next button enabled when map is pending - offline [$500] Request money - Distance - Next button enabled when map is pending - offline Sep 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01d98cf61c3038fc39

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Current assignee @sophiepintoraetz is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

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

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 12, 2023

We're going to update Next button enabled by default in future, there's an issue tracking this. I wonder should we hold for that or we consider this as bug and show an error while map is loading?

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 12, 2023

It is expected considering we fetch the route in backend if the frontend is not rendering the map (offline behaviour)

@peterdbarkerUK
Copy link
Contributor

@b4s36t4 Mahesh - you're referring to this issue, yes?

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 12, 2023

Yes.

@rokko
Copy link

rokko commented Sep 12, 2023

To fix this web can inser a check state when map Is loaded and the next button disabled until map Is finished.

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

📣 @rokko! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@rokko
Copy link

rokko commented Sep 12, 2023

Contributor details
Your Expensify account email: rocco.caricola89@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01cb5b35b8e2eee653

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@peterdbarkerUK peterdbarkerUK removed the External Added to denote the issue can be worked on by a contributor label Sep 13, 2023
@peterdbarkerUK peterdbarkerUK removed their assignment Sep 13, 2023
@peterdbarkerUK peterdbarkerUK added the External Added to denote the issue can be worked on by a contributor label Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

Current assignee @sophiepintoraetz is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@sophiepintoraetz
Copy link
Contributor

Yup, I think we should hold for this issue #27045 - what do you think @sobitneupane?

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@sobitneupane
Copy link
Contributor

@sophiepintoraetz I think we should disable the button when user if offline. I am not sure but I believe it requires response from the server to get the amount.

Can you confirm if this problem can still be replicated? I'm not able to reproduce it on my side.

@melvin-bot
Copy link

melvin-bot bot commented Sep 19, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@sophiepintoraetz
Copy link
Contributor

Need to replicate the issue - so hold fire, Melvin!

@melvin-bot melvin-bot bot added the Overdue label Sep 22, 2023
@sophiepintoraetz
Copy link
Contributor

Still need to find time to replicate the bug and test - will look at this on Monday.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 23, 2023
@sophiepintoraetz
Copy link
Contributor

Still need to reproduce.

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 26, 2023

@sobitneupane @sophiepintoraetz this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot
Copy link

melvin-bot bot commented Sep 26, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 29, 2023

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

@abdel-h66
Copy link
Contributor

abdel-h66 commented Sep 30, 2023

Proposal

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

The next button is enabled on offline mode when there are two valid waypoints.

What is the root cause of that problem?

The issue comes from the isDisabled prop passed to the button
_.size(validatedWaypoints) < 2 || (!isOffline && (hasRouteError || isLoadingRoute || isLoading))
The check _.size(validatedWaypoints) < 2 will be valid once we have two waypoints entered in either offline or online.

The code also assumes that you won't be able to get valid points while offline, which is not true, we can still access the cached suggestions from Google Autocomplete.

isDisabled={_.size(validatedWaypoints) < 2 || (!isOffline && (hasRouteError || isLoadingRoute || isLoading))}

The issue is then replicable on all devices, using the following steps

  1. Start a distance request
  2. enter a valid start point
  3. enter a valid end point
  4. leave the distance request
  5. go offline
  6. go back to create a new distance request
  7. Enter a start point, you will now get cached suggestions
  8. do the same for the end point

Notice the button is now enabled.

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

We need to enforce the check by using isOffline beside the size of the waypoints

_.size(validatedWaypoints) < 2 || (isOffline && _.size(validatedWaypoints) === 2) || (!isOffline && (hasRouteError || isLoadingRoute || isLoading))

map-issue.mp4

What alternative solutions did you explore? (Optional)

N/A

@sophiepintoraetz
Copy link
Contributor

Checking with @jliexpensify here

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@jliexpensify
Copy link
Contributor

jliexpensify commented Oct 2, 2023

I tried to reproduce this one exactly, but my amount says TBD when I'm Offline, not 0:

Screenshot_20231002-161956

I am currently on v.75 and the report is .68, and the behaviour seems to follow what's in #27045 - i.e. the Next button isn't disabled.

@sophiepintoraetz
Copy link
Contributor

Agreed - thank you @jliexpensify! Out of curiosity, what happens when you do click next? Thanks for that find, I'm going to close out this issue as the bug is not intended behaviour.

@jliexpensify
Copy link
Contributor

Out of curiosity, what happens when you do click next?

From memory, a distance request gets created but it's incomplete (i.e. there's no map and it says TBD)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants