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] Onboarding - Changing the URL during onboarding takes back to the first flow #46104

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 24, 2024 · 38 comments
Closed
1 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 Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 24, 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: 9.0.11-2
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:

  1. Sign out of the staging app if signed in already
  2. Log in with a new Gmail address > Continue > Join
  3. When the onboarding flow opens select any option in the "What do you want to do today?" flow
  4. Click continue
  5. Enter a first name in the next flow
  6. Before clicking on continue, copy this link ( https://staging.new.expensify.com/settings/profile
    ) on your browser and hit enter

Expected Result:

After the page re-loads the user is taken to the current process of the onboarding flow ("What's your name?")

Actual Result:

The user is taken one step back in the onboarding flow("What do you want to do today?") and the previously filled-out name is displayed after clicking on continue

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

Bug6551299_1721806826933.2024-07-24_10_18_33.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f2e620ccc728274d
  • Upwork Job ID: 1818010709256699718
  • Last Price Increase: 2024-09-06
  • Automatic offers:
    • tsa321 | Contributor | 103498083
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

Triggered auto assignment to @alexpensify (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
Copy link
Author

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

@lanitochka17
Copy link
Author

@alexpensify 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

@tsa321
Copy link
Contributor

tsa321 commented Jul 24, 2024

Proposal

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

Onboarding reset to first page if user change URL address

What is the root cause of that problem?

When user change the url while in onboarding, in here:

Welcome.isOnboardingFlowCompleted({
onNotCompleted: () => {
const {adaptedState} = getAdaptedStateFromPath(ROUTES.ONBOARDING_ROOT, linkingConfig.config);
navigationRef.resetRoot(adaptedState);
},
});

} else {
onNotCompleted?.();

the problem occurs because the Welcome.isOnboardingFlowCompleted() function is triggered again when the URL changes, causing navigation back to the first page of onboarding. This happens because we do not store the onboarding progress in onyx and use ROUTES.ONBOARDING_ROOT on the onNotCompleted parameter of isOnboardingFlowCompleted

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

We could add onboardingDraft in onyx and store the current address in the onboardingDraft. Then the onNotComppleted will navigate to the last route stored in onBoardingDraft. So in each Welcome.isOnboardingFlowCompleted function call we need to adjust the onNotCompleted parameter to navigate to the stored route in onboardingDraft. Or if it is possible we could directly navigate do the navigation in onNotCompleted, but it seems the onNotCompleted parameter is different on each code that use it.
and if during onboarding process we need to store some data, we could do that in the onyx onboardingDraft too.

@melvin-bot melvin-bot bot added the Overdue label Jul 26, 2024
@alexpensify
Copy link
Contributor

I'll test it soon; this GH is on my testing list.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 26, 2024
@alexpensify
Copy link
Contributor

I've tested this one and can confirm it happens. When you get to the name part, I think nothing has been saved, so I'm wondering if we can account for the page without the save action without clicking Continue on the first and last name tab.

2024-07-29_12-41-42

@melvin-bot melvin-bot bot removed the Overdue label Jul 29, 2024
@alexpensify alexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 29, 2024
@melvin-bot melvin-bot bot changed the title Onboarding - Changing the URL during onboarding takes back to the first flow [$250] Onboarding - Changing the URL during onboarding takes back to the first flow Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

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

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

melvin-bot bot commented Jul 29, 2024

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

@alexpensify
Copy link
Contributor

alexpensify commented Jul 29, 2024

Assigning External, @mollfpr please review if the proposal will fix this issue. I think we should still take the person to the Name tab since they would click continue in the first tab of options for what their account will be used for. Thanks for reviewing!

2024-07-29_12-51-11

@mollfpr
Copy link
Contributor

mollfpr commented Jul 29, 2024

@tsa321 Thanks for the proposal! I did a test but it seems the Welcome.isOnboardingCompletedFlow is not called after refresh.

Instead I found out that the route is set here.

if (!hasCompletedGuidedSetupFlow && authenticated) {
const {adaptedState} = getAdaptedStateFromPath(ROUTES.ONBOARDING_ROOT.route, linkingConfig.config);
return adaptedState;

@tsa321
Copy link
Contributor

tsa321 commented Jul 29, 2024

Thanks, @mollfpr . I’ll need to change that line to use onboard draft -> current route if the visited URL/route is not related to onboarding. I’ll also check all occurrences of ROUTES.ONBOARDING_ROOT in the codebase and adjust the code as needed. I’ll create a branch to test my proposed solution.

@mollfpr
Copy link
Contributor

mollfpr commented Jul 30, 2024

@tsa321 That will be great. Thank you!

@tsa321
Copy link
Contributor

tsa321 commented Jul 31, 2024

@mollfpr, here is the test branch.

I also found a bug: when a user is in the onboarding flow and enters a random URL, the onboarding process shows the first page and then closes without completing the flow. The fix are are in the getAdaptedStateFromPath file.

macos-web-d.mp4

Copy link

melvin-bot bot commented Aug 2, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Aug 2, 2024
@alexpensify
Copy link
Contributor

@mollfpr, when you get a chance, can you review the latest text? Thanks!

Copy link

melvin-bot bot commented Aug 5, 2024

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

@mollfpr
Copy link
Contributor

mollfpr commented Aug 5, 2024

Reviewing!

@melvin-bot melvin-bot bot removed the Overdue label Aug 5, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

📣 @tsa321 🎉 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 📖

@tsa321
Copy link
Contributor

tsa321 commented Aug 14, 2024

I will try to submit a PR tomorrow.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 15, 2024
@tsa321
Copy link
Contributor

tsa321 commented Aug 15, 2024

@mollfpr PR is ready

@alexpensify
Copy link
Contributor

Weekly Update: PR is under review

@alexpensify
Copy link
Contributor

Next Steps

This PR is going through the review process.

Heads up, I will be offline until Tuesday, September 3, 2024, and will not actively watch over this GitHub during that period.

If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks!

@alexpensify
Copy link
Contributor

Catching up from being OOO, I see the PR is moving along.

@chiragsalian
Copy link
Contributor

chiragsalian commented Sep 6, 2024

@alexpensify, can we increase the pricing of this PR to $500. The scope of the PR changed during development (discussed here) to solve two additional bugs on main. Contributor decided to solve it in this PR.

Does that sound fair @tsa321?

@alexpensify alexpensify changed the title [$250] Onboarding - Changing the URL during onboarding takes back to the first flow [$500] Onboarding - Changing the URL during onboarding takes back to the first flow Sep 6, 2024
Copy link

melvin-bot bot commented Sep 6, 2024

Upwork job price has been updated to $500

@alexpensify
Copy link
Contributor

Thanks for this context and done!

@alexpensify
Copy link
Contributor

Weekly Update: Waiting for this one to go to production

@alexpensify
Copy link
Contributor

Now we wait for this one to go through automation. It went into production yesterday.

@alexpensify
Copy link
Contributor

Automation didn't kick in, so I'll need to manually work on the payment process.

@alexpensify
Copy link
Contributor

Payouts due: 09-27-2024

  • Contributor: $500 @tsa321
  • Contributor+: $500 @mollfpr - please submit a request in Chat

Upwork job is here.

Closing - I've completed the payment process via Upwork for @tsa321 and @mollfpr will submit a request in Chat.

@garrettmknight
Copy link
Contributor

$500 approved for @mollfpr

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 Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants