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] IOU - In distance request confirmation page, location access permission box is shown. #36491

Closed
3 of 6 tasks
lanitochka17 opened this issue Feb 14, 2024 · 28 comments
Closed
3 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Not a priority

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 14, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.41
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4314136
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Pre:condition: device location is off

  1. Launch app
  2. Tap on workspace chat
  3. Tap plus icon --- request money---distance
  4. Tap no, thanks and deny device location permission
  5. Tap start
  6. Tap use location
  7. Tap no, thanks and deny device location permission
  8. Tap cross button and close the device location denied message
  9. Select a location from dropdown list
  10. Tap finish
  11. Perfom step 6-- step9
  12. Tap add stop
  13. Perfom step 6-- step9
  14. Tap next

Expected Result:

In distance request confirmation page, location access permission box must not be shown

Actual Result:

In distance request confirmation page, location access permission box is shown

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6379190_1707908248130.do.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01898dd3cbc3df8779
  • Upwork Job ID: 1757774834158333952
  • Last Price Increase: 2024-02-14
  • Automatic offers:
    • s77rt | Reviewer | 0
    • bernhardoj | Contributor | 0
    • esh-g | Contributor | 0
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 14, 2024
@melvin-bot melvin-bot bot changed the title IOU - In distance request confirmation page, location access permission box is shown. [$500] IOU - In distance request confirmation page, location access permission box is shown. Feb 14, 2024
Copy link

melvin-bot bot commented Feb 14, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01898dd3cbc3df8779

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 14, 2024
Copy link

melvin-bot bot commented Feb 14, 2024

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

Copy link

melvin-bot bot commented Feb 14, 2024

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave5
CC @dylanexpensify

@esh-g
Copy link
Contributor

esh-g commented Feb 14, 2024

Proposal

Please re-state the problem we are trying to solve

In distance request confirmation page, location access permission box is shown

What is the root cause of this problem?

The root cause is that we try to get the current position of the user for every render for MapView even if we don't need it in this useEffect here:

getCurrentPosition(

What changes should be made to fix this?

We should only try to get the current location of the user if shouldPanMapToCurrentLocation is true

const shouldPanMapToCurrentPosition = useCallback(() => !userInteractedWithMap && (!waypoints || waypoints.length === 0), [userInteractedWithMap, waypoints]);

@bernhardoj
Copy link
Contributor

Proposal

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

In distance confirmation page, a location permission dialog shows.

What is the root cause of that problem?

The map view component has a useFocusEffect that will be triggered every time the page is focused.

useFocusEffect(
useCallback(() => {
if (isOffline) {
return;
}
if (hasAskedForLocationPermission.current) {
return;
}
hasAskedForLocationPermission.current = true;
getCurrentPosition(

It will call getCurrentPosition which will request the location permission. The map view is also placed on the confirmation page, so when we visit the confirmation page, the permission dialog will be shown (no need to perform the long step).

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

I think we don't need to get the current position anymore on the confirmation page, so we can introduce a new prop to ignore the getCurrentPosition call and set the current position from the initialState.

if (useInitialStatePosition) {
    setCurrentPosition({longitude: initialState.location[0], latitude: initialState.location[1]});
    return;
}

@s77rt
Copy link
Contributor

s77rt commented Feb 15, 2024

@esh-g Thanks for the proposal. Your RCA is about right. The solution looks good to me.

🎀 👀 🎀 C+ reviewed
Link to proposal

@s77rt
Copy link
Contributor

s77rt commented Feb 15, 2024

@bernhardoj Thanks for the proposal. Your RCA is about right. As for the solution, I don't think we need a new prop here

Copy link

melvin-bot bot commented Feb 15, 2024

Triggered auto assignment to @chiragsalian, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@chiragsalian
Copy link
Contributor

Proposal sounds good to me, feel free to create the PR @bernhardoj.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 15, 2024
Copy link

melvin-bot bot commented Feb 15, 2024

📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 15, 2024

📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@esh-g
Copy link
Contributor

esh-g commented Feb 16, 2024

@chiragsalian I think @s77rt recommended my proposal instead... could you please double check your decision?

@esh-g
Copy link
Contributor

esh-g commented Feb 16, 2024

Gentle bump @chiragsalian @s77rt

@chiragsalian
Copy link
Contributor

oh whoops, i'm so sorry. Reassigning to @esh-g.

@chiragsalian chiragsalian added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 16, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 16, 2024
Copy link

melvin-bot bot commented Feb 16, 2024

📣 @esh-g 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@chiragsalian
Copy link
Contributor

chiragsalian commented Feb 16, 2024

Thanks for quickly bringing that to my attention. I've gone ahead and reassigned the issue to you @esh-g. Feel free to make a PR.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 17, 2024
@esh-g
Copy link
Contributor

esh-g commented Feb 17, 2024

PR is here: #36761
cc @s77rt

@kevinksullivan
Copy link
Contributor

PR merged! Waiting on deploy.

@esh-g
Copy link
Contributor

esh-g commented Mar 12, 2024

@chiragsalian @kevinksullivan I think the issue PR has already crossed the production timeline. Could you please list if anything is pending? Thanks!

@chiragsalian
Copy link
Contributor

Oh true, its been live since feb 28th so this is past the 7 day regression period. I'm unsure why the GH title didn't change here. Might have been a bug.
I don't think anything is pending here.
@kevinksullivan can you handle the payment and close out this issue.

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Apr 5, 2024
Copy link

melvin-bot bot commented Apr 5, 2024

This issue has not been updated in over 15 days. @chiragsalian, @s77rt, @kevinksullivan, @esh-g 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 melvin-bot bot added the Monthly KSv2 label Apr 5, 2024
@s77rt
Copy link
Contributor

s77rt commented Apr 5, 2024

This is due payment

@chiragsalian
Copy link
Contributor

Friendly bump @kevinksullivan, to handle payment.

Copy link

melvin-bot bot commented Jun 6, 2024

@chiragsalian, @s77rt, @kevinksullivan, @esh-g, this Monthly task hasn't been acted upon in 6 weeks; closing.

If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

@s77rt
Copy link
Contributor

s77rt commented Jun 6, 2024

Only Melvin got paid. This is still due payment

@chiragsalian chiragsalian reopened this Jun 10, 2024
@chiragsalian
Copy link
Contributor

@kevinksullivan / @mallenexpensify, can one of you handle payment for @s77rt over here.

@mallenexpensify mallenexpensify removed the Reviewing Has a PR in review label Jun 11, 2024
@mallenexpensify
Copy link
Contributor

Contributor: @esh-g paid $500 via Upwork
Contributor+: @s77rt paid $500 via Upwork.

Sorry it took forever. If you ever see a Reviewing label on an issue when it's awaiting payment, please comment and ask for it to be removed

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. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Not a priority
Projects
None yet
Development

No branches or pull requests

7 participants