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

[Payment due 3/7][$500] Conversation - Back arrow leads to LHN instead of group lists after page refresh in a profile screen #33797

Closed
2 of 6 tasks
izarutskaya opened this issue Dec 30, 2023 · 36 comments
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

@izarutskaya
Copy link

izarutskaya commented Dec 30, 2023

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


Found when executing PR: #31424

Version Number: v1.4.20-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:
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. Navigate to https://staging.expensify.com/
    and log in
  2. Create a group conversation
  3. Type something
  4. Open group details > members
  5. Open any profile
  6. Refresh the page
  7. Tap on the back button to navigate up to the top of the screen (left side)

Expected Result:

The user should be taken to the group members page instead of LHN.

Actual Result:

After a page refresh, the back button leads the user directly to LHN.

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

Bug6328884_1703904047773.mWeb_-_back_button.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0110014b7fdb5c2a05
  • Upwork Job ID: 1741169400678555648
  • Last Price Increase: 2023-12-30
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 28096418
    • Tony-MK | Contributor | 28096419
@izarutskaya izarutskaya 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 Dec 30, 2023
Copy link

melvin-bot bot commented Dec 30, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0110014b7fdb5c2a05

@melvin-bot melvin-bot bot changed the title Conversation - Back arrow leads to LHN instead of group lists after page refresh in a profile screen [$500] Conversation - Back arrow leads to LHN instead of group lists after page refresh in a profile screen Dec 30, 2023
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 30, 2023
Copy link

melvin-bot bot commented Dec 30, 2023

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

Copy link

melvin-bot bot commented Dec 30, 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

Copy link

melvin-bot bot commented Dec 30, 2023

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

@Tony-MK
Copy link
Contributor

Tony-MK commented Dec 30, 2023

Proposal

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

The back arrow leads to LHN instead of group lists after the page refreshes in a profile screen.

What is the root cause of that problem?

We are not setting any backTo argument in the ReportParticipantsPage

Navigation.navigate(ROUTES.PROFILE.getRoute(option.accountID));

Therefore, in the ProfilePage navigateBackTo will take ROUTES.HOME because it is the default when backTo param is not available.

const navigateBackTo = lodashGet(props.route, 'params.backTo', ROUTES.HOME);

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

Set backTo to the optional argument in the getRoute function to the current route to the ReportParticipantsPage.

Navigation.navigate(ROUTES.PROFILE.getRoute(option.accountID, backTo = ROUTES.REPORT_PARTICIPANTS.getRoute(props.report.reportID)));

@abzokhattab
Copy link
Contributor

abzokhattab commented Dec 31, 2023

Proposal

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

The back navigation behavior in the participants and profile pages is not working as expected

What is the root cause of that problem?

Two issues here:

  1. When a user is on the r/:id/participants page and refreshes the page and clicks the back button, they are not redirected to the report details page. Instead, the modal closes.
    This happens because the HeaderWithBackButton component doesn't have a specified onBackButtonClick behavior, leading to the default behavior of returning the user to the home page.

  2. If a user is on the profile page, and refreshes the page, and then hits back, the modal unexpectedly closes. This is due to the absence of the backTo parameter when routing from the participant's page to the profile page.

    Navigation.navigate(ROUTES.PROFILE.getRoute(option.accountID));

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

  1. Modify the HeaderWithBackButton component in the ReportParticipantsPage to include the onBackButtonClick prop. This change ensures that clicking the back button redirects users to the report details page, rather than closing the modal:
       <HeaderWithBackButton
                        onBackButtonPress={() => Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(props.report.reportID))}
                        title={props.translate(
                            ReportUtils.isChatRoom(props.report) ||
                                ReportUtils.isPolicyExpenseChat(props.report) ||
                                ReportUtils.isChatThread(props.report) ||
                                ReportUtils.isTaskReport(props.report) ||
                                ReportUtils.isMoneyRequestReport(props.report)
                                ? 'common.members'
                                : 'common.details',
                        )}
                    />
  1. To fix the second issue we need to add a BackTo parameter in the navigation from the participant's page to the profile page. This will ensure the back navigation works as expected after a page refresh:
Navigation.navigate(ROUTES.PROFILE.getRoute(option.accountID, ROUTES.REPORT_PARTICIPANTS.getRoute(props.report.reportID)));

POC

Screen.Recording.2023-12-31.at.4.45.45.PM.mov

@abzokhattab
Copy link
Contributor

FYI the issue is reproducible on MacOS: Chrome / Safari as well

@abdulrahuman5196
Copy link
Contributor

Reviewing now

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
@abdulrahuman5196
Copy link
Contributor

@Tony-MK 's proposal here #33797 (comment) looks good and works well. There are also other ingresses leading to the Profile page wherein clicking the back is leading to LHN. So @Tony-MK's PR should aim to fix other ingresses as well. Other proposals here is like a extension of the approved proposal implementing similar fix at other places as well.

🎀 👀 🎀
C+ Reviewed

Copy link

melvin-bot bot commented Jan 2, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Jan 4, 2024
@Christinadobrzyn
Copy link
Contributor

waiting for review @Gonals when you have time can you buddy check the decision here - #33797 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Jan 4, 2024
@Christinadobrzyn
Copy link
Contributor

I'm going to be ooo next week so adding a buddy to monitor this while I'm gone.

status - #33797 (comment)

@Christinadobrzyn Christinadobrzyn added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jan 8, 2024
Copy link

melvin-bot bot commented Jan 8, 2024

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

This comment was marked as off-topic.

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

melvin-bot bot commented Jan 12, 2024

📣 @abdulrahuman5196 🎉 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 Jan 12, 2024

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

Copy link

melvin-bot bot commented Jan 13, 2024

@CortneyOfstad @Gonals @Tony-MK @abdulrahuman5196 @Christinadobrzyn 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!

@CortneyOfstad
Copy link
Contributor

@Gonals bump again on the comment #33797 (comment). Thanks!

@Gonals
Copy link
Contributor

Gonals commented Jan 16, 2024

@Gonals bump again on the comment #33797 (comment). Thanks!

I already reacted and assigned the developer a few days ago! 😁

@CortneyOfstad
Copy link
Contributor

Sorry about that @Gonals!

@Tony-MK any update on the PR for this? Thanks!

@Tony-MK
Copy link
Contributor

Tony-MK commented Jan 22, 2024

@CortneyOfstad, Waiting for the PR review.

@abdulrahuman5196
Copy link
Contributor

Caught up in a priority issue yesterday and today. Will try to close out the PR by tomorrow.

@CortneyOfstad
Copy link
Contributor

@abdulrahuman5196 any updates on the PR? Thanks!

@CortneyOfstad
Copy link
Contributor

@abdulrahuman5196 bump ^^^

@abdulrahuman5196
Copy link
Contributor

@CortneyOfstad hi, we had some comments on the PR. I need to review the latest version. Will work on reviewing latest version.

@CortneyOfstad
Copy link
Contributor

Sounds good @abdulrahuman5196 — thanks!

@CortneyOfstad
Copy link
Contributor

@abdulrahuman5196 just checking in to see where we're at with the comments on the PR — thank you!

@abdulrahuman5196
Copy link
Contributor

Hi @CortneyOfstad . Will close the pending action items in my morning.

@CortneyOfstad
Copy link
Contributor

@abdulrahuman5196 Any update on the PR? If the pending action has not been completed, do you think that is something that can be done by EOD? Thanks!

@abdulrahuman5196
Copy link
Contributor

@CortneyOfstad The PR has been merged

@CortneyOfstad
Copy link
Contributor

Thanks @abdulrahuman5196! It shows that is has not launched to staging yet due to on-going QA, so going to keep an eye on this 👍

@CortneyOfstad
Copy link
Contributor

PR went into staging 2 days ago 👍

@CortneyOfstad
Copy link
Contributor

@Christinadobrzyn I am going OoO until March 11th, so going to have you keep an eye on this while I am gone if that is okay? Thanks!

@abdulrahuman5196
Copy link
Contributor

The PR that introduced the bug has been identified. Link to the PR:
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:
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:

Doesn't seem to be a regression. Seems to be a bug for sometime.

Determine if we should create a regression test for this bug.

Yes.

If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

  1. Go to the application and log in.
  2. Create a group chat, if none exists.
  3. Go to the group chat.
  4. Open the group details > members list.
  5. Visit a member's profile page and refresh it.
  6. Verify that the same member's profile page is displayed like in step 5.
  7. Tap on the back button.
  8. Verify the app navigated back to the member's list mentioned in step 4.

@Christinadobrzyn Added bz checklist. This issue should be on payment due for March 7. It seems melvin didn't update automatically

@Christinadobrzyn Christinadobrzyn changed the title [$500] Conversation - Back arrow leads to LHN instead of group lists after page refresh in a profile screen [Payment due 3/7][$500] Conversation - Back arrow leads to LHN instead of group lists after page refresh in a profile screen Mar 7, 2024
@Christinadobrzyn
Copy link
Contributor

Thanks @abdulrahuman5196!

Payouts due:

Contributor: $500 @Tony-MK (paid in Upwork - https://www.upwork.com/nx/wm/offer/28096419
Contributor+: $500 @abdulrahuman5196 (paid in Upwork - https://www.upwork.com/nx/wm/offer/28096418)

Upwork job is here.

Regression test - https://github.com/Expensify/Expensify/issues/376315

I think this is good to close - let me know otherwise!

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
None yet
Development

No branches or pull requests

7 participants