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
3.53k stars 2.88k forks source link

[$500] [HOLD for payment 2023-11-30] Web - Referral - 'Got it' button does not take you back to the Previous page after a reload #31628

Closed kbecciv closed 11 months ago

kbecciv commented 11 months 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.1.5 Reproducible in staging?: y Reproducible in production?: new feature 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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

  1. Click on FAB > Request Money > switch to Manual
  2. Enter the amount and click on Next
  3. Click on 'Request money, get $250' to go to the referral page
  4. Reload the page
  5. Click on the 'Got it' Button

Expected Result:

Click on the 'Got it' Button takes you back to the Manual page

Actual Result:

Click on the 'Got it' Button takes you back to the main chat.

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/93399543/e9241618-b661-44da-8fab-ea3c274badc2

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0114db822bdf934768
  • Upwork Job ID: 1730235291142729728
  • Last Price Increase: 2023-11-30
melvin-bot[bot] commented 11 months ago

Triggered auto assignment to @grgia (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

DylanDylann commented 11 months ago

Proposal

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

Web - Referral - 'Got it' button does not take you back to the Previous page after a reload

What is the root cause of that problem?

Currently, when clicking Got it button, we will call Navigation.goBack(). https://github.com/Expensify/App/blob/0cca90ab9aa7fd9467ef45ca35c4d0ad3c3334ae/src/pages/ReferralDetailsPage.js#L89 So if we reload page navigation history will be lost, It cause this bug. The same bug also happen when we click back button https://github.com/Expensify/App/blob/0cca90ab9aa7fd9467ef45ca35c4d0ad3c3334ae/src/pages/ReferralDetailsPage.js#L63

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

We should define new goBack function in the ReferralDetailsPage We should use referralContentType in route to detect which is previous page and navigate to this page directly:

What alternative solutions did you explore? (Optional)

luacmartins commented 11 months ago

@DylanDylann are you able to work on a PR within the next hour?

Tony-MK commented 11 months ago

@luacmartins I am available, only if dylan is away. Should I post a prospal?

luacmartins commented 11 months ago

sure, go ahead

Tony-MK commented 11 months ago

@luacmartins It seems that I can't come up with a better proposal than Dylan's. If I do post a proposal, most likely it will be the same as Dylans.

luacmartins commented 11 months ago

We got a fix merged and CPed

DylanDylann commented 11 months ago

@DylanDylann are you able to work on a PR within the next hour?

@luacmartins It was 2:42 AM in my time, so I wasn't available to raise a quick PR. Thanks so much for your PR. Could you assign me to this issue for compensation?

melvin-bot[bot] commented 11 months ago

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

melvin-bot[bot] commented 11 months ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 11 months ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 11 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.2-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-11-30. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 11 months ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

melvin-bot[bot] commented 11 months ago

Job added to Upwork: https://www.upwork.com/jobs/~0114db822bdf934768

melvin-bot[bot] commented 11 months ago

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

conorpendergrast commented 11 months ago

It looks like @DylanDylann is the only person to be compensated here. @luacmartins given you assigned @DylanDylann to the issue, I'm taking that as an endorsement of the solution and that partial compensation is needed here (as @DylanDylann didn't create the PR directly). I'm going to move ahead with 50% compensation (so that's 50% of $500 = $250)

conorpendergrast commented 11 months ago

Payouts due:

Upwork job is here.

conorpendergrast commented 11 months ago

Paid @DylanDylann!

@luacmartins From the checklist, as you filled out the first three steps, do you think we need a regression test?

Once we confirm that and complete the checklist, we'll be set to close this out

luacmartins commented 11 months ago

No need for regression test since Applause already caught this issue during regression.

luacmartins commented 11 months ago

Closing issue as per comment above. Thanks everyone!

conorpendergrast commented 11 months ago

Damn, you stole the satisfying bit.

And thanks! I am still not used to 90% of bugs coming directly from regression testing

luacmartins commented 11 months ago

Sorry haha I'll let you close it next time :)