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

[WAITING ON CHECKLIST][$250] Workspace picker -Inconsistent Navigation After Creating Workspace on "Workspace picker" #46816

Closed
3 of 6 tasks
izarutskaya opened this issue Aug 5, 2024 · 31 comments
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 Reviewing Has a PR in review

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 5, 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.16-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to [staging.new.expensify.com].
  2. Click on the "Workspace picker"
  3. Click on the plus icon to create a new workspace.
  4. Click the in-app back button.
  5. Observe that you are not navigated back to the previous page.
  6. Navigate to the inbox.
  7. Click on the "Workspace picker"
  8. Click on the plus icon to create a new workspace.
  9. Click the browser’s back button.

Expected Result:

After creating a workspace from the "Workspace picker" page, the in-app back button should navigate the user back to the "Workspace picker" page, consistent with the behavior of the browser's back button.

Actual Result:

After creating a workspace from the "Workspace picker" page using the plus icon, the in-app back button fails to navigate to the workspace picker page, while the browser’s back button correctly returns the user to the "Workspace picker" page.

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

Bug6551272_1721804258973.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d2558fbd9a9d9b23
  • Upwork Job ID: 1820632265547564333
  • Last Price Increase: 2024-08-06
Issue OwnerCurrent Issue Owner: @
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 5, 2024
Copy link

melvin-bot bot commented Aug 5, 2024

Triggered auto assignment to @jliexpensify (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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Aug 6, 2024
@melvin-bot melvin-bot bot changed the title Workspace picker -Inconsistent Navigation After Creating Workspace on "Workspace picker" [$250] Workspace picker -Inconsistent Navigation After Creating Workspace on "Workspace picker" Aug 6, 2024
Copy link

melvin-bot bot commented Aug 6, 2024

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

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

melvin-bot bot commented Aug 6, 2024

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

@jliexpensify
Copy link
Contributor

Able to repro on v9.0.16-5 (staging)

@nkdengineer
Copy link
Contributor

nkdengineer commented Aug 6, 2024

Edited by proposal-police: This proposal was edited at 2024-08-06 06:56:45 UTC.

Proposal

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

After creating a workspace from the "Workspace picker" page using the plus icon, the in-app back button fails to navigate to the workspace picker page, while the browser’s back button correctly returns the user to the "Workspace picker" page.

What is the root cause of that problem?

When going back here, we just dismissModal, so it will only dismiss the workspace profile page and will not go back to the workspace switcher as it should do.

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

We should use the accepted approach of using backTo route param to make sure the navigation is correct in these cases. (We use same approach in various scenarios, examples: there, there and there)

  1. Update
    onBackButtonPress={Navigation.dismissModal}
    to go to the backTo route if there's backTo param defined.
onBackButtonPress={() => {
    if (route.params?.backTo) {
        Navigation.resetToHome();
        Navigation.navigate(route.params.backTo);
    } else {
        Navigation.dismissModal();
    }
}}
  1. Update the route definition here to allow a backTo param
getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`settings/workspaces/${policyID}`, backTo) as const,
  1. Use the backTo param here and in createWorkspaceWithPolicyDraftAndNavigateToIt too

  2. Then in here, pass the current route (or specifically ROUTES.WORKSPACE_SWITCHER) as backTo

What alternative solutions did you explore? (Optional)

In step 1 above, to navigate to backTo route we can use

Navigation.goBack(route.params.backTo, true);

@nkdengineer
Copy link
Contributor

Proposal updated to add an alternation solution

@eh2077
Copy link
Contributor

eh2077 commented Aug 7, 2024

@nkdengineer 's proposal looks good to me. Coding details can be discussed in PR.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 7, 2024

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

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

melvin-bot bot commented Aug 7, 2024

❌ There was an error making the offer to @eh2077 for the Reviewer role. The BZ member will need to manually hire the contributor.

Copy link

melvin-bot bot commented Aug 7, 2024

❌ There was an error making the offer to @nkdengineer for the Contributor role. The BZ member will need to manually hire the contributor.

@carlosmiceli carlosmiceli added Weekly KSv2 and removed Monthly KSv2 labels Aug 30, 2024
@jliexpensify jliexpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Sep 1, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 1, 2024
Copy link

melvin-bot bot commented Sep 1, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 1, 2024
@jliexpensify jliexpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 1, 2024
@jliexpensify
Copy link
Contributor

Hmm looks like the automation broke, I'll manually hire.

@jliexpensify
Copy link
Contributor

Hired @eh2077 and @nkdengineer

@parasharrajat
Copy link
Member

Please hold off hiring anyone while I am checking the task.

Copy link

melvin-bot bot commented Sep 10, 2024

@carlosmiceli, @jliexpensify, @eh2077, @nkdengineer Huh... This is 4 days overdue. Who can take care of this?

@carlosmiceli
Copy link
Contributor

What's the status here @parasharrajat?

@parasharrajat
Copy link
Member

I noticed that the PR is merged for this issue so there is nothing we need to hold here.

@carlosmiceli
Copy link
Contributor

Gotcha! Can we close this then @jliexpensify ?

@jliexpensify
Copy link
Contributor

jliexpensify commented Sep 10, 2024

Before I do, I just want to confirm: @parasharrajat you had a PR that fixed this, so there's no need to hire and pay anyone?

I notice @nkdengineer and @eh2077 were hired, so will need to cancel these contracts if so.

@eh2077
Copy link
Contributor

eh2077 commented Sep 11, 2024

@jliexpensify I believe our work previously hired is legitimate for payment. And it's been overdue for quite a while

@jliexpensify
Copy link
Contributor

jliexpensify commented Sep 11, 2024

Sorry, let's take a step back here! I want to clarify exactly what needs to be done.

Firstly, I am trying to work out what @parasharrajat means by this: #46816 (comment)

Rajat, can you clarify this comment please? Are you implying the PR was not needed to fix this issue?

Separately, @eh2077 - you and @nkdengineer worked on #46939 that resolved this issue? cc @carlosmiceli

@eh2077
Copy link
Contributor

eh2077 commented Sep 11, 2024

Yes, #46939 is the PR we worked on to fix this issue.

@jliexpensify
Copy link
Contributor

Great, so it sounds like this is the Payment Summary and job:

https://www.upwork.com/jobs/~01d2558fbd9a9d9b23

So @parasharrajat - I'll wait for your explanation on this before making payment: #46816 (comment)

@parasharrajat
Copy link
Member

Actually, the PR for this issue was already merged before I was tagged on this issue. That's why I suggested we don't need to hold this issue if the work is already done here. No PR has been created or reviewed by me for this issue yet.

@jliexpensify
Copy link
Contributor

Ok, thanks for clearing this one up! @eh2077 do we need a checklist here?

@jliexpensify
Copy link
Contributor

Everyone has been paid, just waiting on checklist.

@jliexpensify jliexpensify changed the title [$250] Workspace picker -Inconsistent Navigation After Creating Workspace on "Workspace picker" [WAITING ON CHECKLIST][$250] Workspace picker -Inconsistent Navigation After Creating Workspace on "Workspace picker" Sep 12, 2024
@jliexpensify
Copy link
Contributor

Bump @eh2077 for checklist

@eh2077
Copy link
Contributor

eh2077 commented Sep 17, 2024

Checklist

  • [@eh2077] The PR that introduced the bug has been identified. Link to the PR: I don't think there's a PR causes this bug. It's an edge case we want to polish
  • [@eh2077] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
  • [@eh2077] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
  • [@eh2077] Determine if we should create a regression test for this bug. Yes

Regression test

  1. Click on the "Workspace picker"
  2. Click on the plus icon to create a new workspace.
  3. Click the in-app back button.
  4. Observe that you are not navigated back to the previous page.
  5. Navigate to the inbox.
  6. Click on the "Workspace picker"
  7. Click on the plus icon to create a new workspace.
  8. Click the browser’s back button.
  9. Verify that: After creating a workspace from the "Workspace picker" page, the in-app back button should navigate the user back to the "Workspace picker" page

Do you agree 👍 or 👎?

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

No branches or pull requests

6 participants