You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Payment due 3/7][$500] Conversation - Back arrow leads to LHN instead of group lists after page refresh in a profile screen #33797
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: @
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[/+]on Dec 30, 2023
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:
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.
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.
What changes do you think we should make in order to solve the problem?
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:
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:
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.
Go to the application and log in.
Create a group chat, if none exists.
Go to the group chat.
Open the group details > members list.
Visit a member's profile page and refresh it.
Verify that the same member's profile page is displayed like in step 5.
Tap on the back button.
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
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[/+]on Mar 7, 2024
Activity
melvin-bot commentedon Dec 30, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0110014b7fdb5c2a05
[-]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[/+]melvin-bot commentedon Dec 30, 2023
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 30, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 30, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)Tony-MK commentedon 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
backToargument in the ReportParticipantsPageApp/src/pages/ReportParticipantsPage.js
Line 124 in 8cb48e4
Therefore, in the ProfilePage
navigateBackTowill takeROUTES.HOMEbecause it is the default whenbackToparam is not available.App/src/pages/ProfilePage.js
Line 134 in 8cb48e4
What changes do you think we should make in order to solve the problem?
Set
backToto the optional argument in thegetRoutefunction to the current route to the ReportParticipantsPage.abzokhattab commentedon 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:
When a user is on the
r/:id/participantspage 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
onBackButtonClickbehavior, leading to the default behavior of returning the user to the home page.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
backToparameter when routing from the participant's page to the profile page.App/src/pages/ReportParticipantsPage.js
Line 124 in 9208c95
What changes do you think we should make in order to solve the problem?
HeaderWithBackButtoncomponent in theReportParticipantsPageto include theonBackButtonClickprop. This change ensures that clicking the back button redirects users to the report details page, rather than closing the modal:BackToparameter 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:POC
Screen.Recording.2023-12-31.at.4.45.45.PM.mov
abzokhattab commentedon Dec 31, 2023
FYI the issue is reproducible on
MacOS: Chrome / Safarias well30 remaining items
CortneyOfstad commentedon Jan 31, 2024
@abdulrahuman5196 any updates on the PR? Thanks!
CortneyOfstad commentedon Feb 5, 2024
@abdulrahuman5196 bump ^^^
abdulrahuman5196 commentedon Feb 5, 2024
@CortneyOfstad hi, we had some comments on the PR. I need to review the latest version. Will work on reviewing latest version.
CortneyOfstad commentedon Feb 6, 2024
Sounds good @abdulrahuman5196 — thanks!
CortneyOfstad commentedon Feb 14, 2024
@abdulrahuman5196 just checking in to see where we're at with the comments on the PR — thank you!
abdulrahuman5196 commentedon Feb 14, 2024
Hi @CortneyOfstad . Will close the pending action items in my morning.
CortneyOfstad commentedon Feb 22, 2024
@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 commentedon Feb 22, 2024
@CortneyOfstad The PR has been merged
CortneyOfstad commentedon Feb 23, 2024
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 commentedon Feb 28, 2024
PR went into staging 2 days ago 👍
CortneyOfstad commentedon Feb 29, 2024
@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 commentedon Mar 5, 2024
Doesn't seem to be a regression. Seems to be a bug for sometime.
Yes.
@Christinadobrzyn Added bz checklist. This issue should be on payment due for March 7. It seems melvin didn't update automatically
[-][$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[/+]Christinadobrzyn commentedon Mar 7, 2024
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!