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
[$500] Web - When a user changes their profile status, the app brings you to the end of the conversation. #33110
BugSomething is broken. Auto assigns a BugZero manager.EngineeringInternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewWeeklyKSv2
Version Number: 1.4.13.0 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:
Launch the app
Log in with any account
Open the 1:1 conversation
Scroll to the middle
Go to the seating - Profile - Status
Change the status
Expected Result:
When a user changes their profile status, the app should stay in the same conversation position
Actual Result:
When a user changes their profile status, the app brings you to the end of the conversation
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Web - When a user changes their profile status, the app brings you to the end of the conversation.[/-][+][$500] Web - When a user changes their profile status, the app brings you to the end of the conversation.[/+]on Dec 14, 2023
Please re-state the problem that we are trying to solve in this issue.
When a user changes their profile status, the app brings you to the end of the conversation.
What is the root cause of that problem?
Currently we are popingToTop after saving a profile status as we set setShouldPopAllStateOnUP when we come from the status button flow (not profile > status flow) here
// Prevent opening Settings page when click profile avatar quickly after clicking FAB icon
return;
}
Navigation.setShouldPopAllStateOnUP();
Navigation.navigate(ROUTES.SETTINGS_STATUS);
so the page is unnecessarily reloading and the report screen is scrolled to bottom creating a disturbing user experience and I think we should avoid this unnecessary reloading.
What changes do you think we should make in order to solve the problem?
We should use goBack when we come from the status button flow without fallbackRoute we can do that by saving an indicator that the user comes from the status button flow (like fromStatusButonFlow in onyx) here
The necessity of saving it in onyx is to make it work perfectly on page refresh. otherwise, we can also use global variable just similar to shouldPopAllStateOnUP. By the way, currently, if you press the status button and then on the status page refresh and press back on the status page it navigates to profile page which is wrong (related bug) it should pop the RHP as it would if you haven't refreshed.
What alternative solutions did you explore? (Optional)
So, the current report is also popped out from the stack, and a new one will be added.
What changes do you think we should make in order to solve the problem?
I would like to propose a quite different solution. First of all, I think we shouldn't use setShouldPopAllStateOnUP. I see 1 flaw with that approach.
If we open the status page from the sidebar avatar, shouldPopAllStateOnUP will be true. If we close the status page by pressing the overlay, shouldPopAllStateOnUP will stay true (we only reset shouldPopAllStateOnUP when calling goBack).
Because it's still true if we open the status page from the profile page and press back, it will pop out all screens, even though it should go back to the profile page.
So, the solution I would like to propose is to have a different route path for the status page, depending on where we open it. If we open it from the sidebar avatar, we will navigate to /status, but if we open it from the profile page, then we will navigate to the same route we have now, that is /settings/profile/status.
Add a new screen in ModalStackNavigators.tsx, specifically in SettingsModalStackNavigator navigator. (you can add it above SCREENS.SETTINGS.PROFILE.STATUS)
[SCREENS.STATUS]: () => require('../../../pages/settings/Profile/CustomStatus/StatusPage').default as React.ComponentType,
I believe that fair compensation is warranted for the time I spent investigating solutions, creating and updating the PR. This is because another contributor raised a regression issue that was not clearly communicated. Additionally, this contributor made multiple updates without notifying others after my solution works he also continued to update, and the reviewer also delayed reviewing the PR.
Ok, I've reviewed the thread/PR and I think that @suneox is due compensation since they did do the work they were hired for, though we didn't end up using it.
I think @mananjadhav is due 50% compensation since they did partial work, but did not review/test the PR.
Payment summary:
C - @suneox - $500 - to be paid via Upwork
C+ - @mananjadhav $250 - to be paid via NewDot
@suneox can you please send me a link to your upwork profile? @mananjadhav please request on NewDot.
BugSomething is broken. Auto assigns a BugZero manager.EngineeringInternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewWeeklyKSv2
Activity
[-]Web - When a user changes their profile status, the app brings you to the end of the conversation.[/-][+][$500] Web - When a user changes their profile status, the app brings you to the end of the conversation.[/+]melvin-bot commentedon Dec 14, 2023
Triggered auto assignment to @puneetlath (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 14, 2023
Job added to Upwork: https://www.upwork.com/jobs/~017a47704cf8762519
melvin-bot commentedon Dec 14, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 14, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (
External)FitseTLT commentedon Dec 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user changes their profile status, the app brings you to the end of the conversation.
What is the root cause of that problem?
Currently we are
popingToTopafter saving a profile status as we setsetShouldPopAllStateOnUPwhen we come from the status button flow (not profile > status flow) hereApp/src/pages/home/sidebar/AvatarWithOptionalStatus.js
Lines 32 to 39 in 904cf56
so the page is unnecessarily reloading and the report screen is scrolled to bottom creating a disturbing user experience and I think we should avoid this unnecessary reloading.
What changes do you think we should make in order to solve the problem?
We should use
goBackwhen we come from the status button flow withoutfallbackRoutewe can do that by saving an indicator that the user comes from the status button flow (likefromStatusButonFlowin onyx) hereApp/src/pages/home/sidebar/AvatarWithOptionalStatus.js
Lines 32 to 39 in 904cf56
App/src/pages/settings/Profile/CustomStatus/StatusPage.js
Line 72 in 904cf56
The necessity of saving it in onyx is to make it work perfectly on page refresh. otherwise, we can also use global variable just similar to
shouldPopAllStateOnUP. By the way, currently, if you press the status button and then on the status page refresh and press back on the status page it navigates to profile page which is wrong (related bug) it should pop the RHP as it would if you haven't refreshed.What alternative solutions did you explore? (Optional)
bernhardoj commentedon Dec 15, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
If we open another chat, then open the status page from the sidebar (settings) avatar, and then close it, a new chat will open.
What is the root cause of that problem?
When we open the status page from the sidebar avatar, we set
shouldPopAllStateOnUP.App/src/pages/home/sidebar/AvatarWithOptionalStatus.js
Lines 38 to 39 in 3a44f77
Then, on pressing back/save, we call
goBackwithshouldPopToTop(3rd param) as true.App/src/pages/settings/Profile/CustomStatus/StatusPage.js
Line 72 in 3a44f77
If both
shouldPopAllStateOnUPandshouldPopToTopare true, it will pop all screens up to the LHN.App/src/libs/Navigation/Navigation.ts
Lines 146 to 152 in 3a44f77
So, the current report is also popped out from the stack, and a new one will be added.
What changes do you think we should make in order to solve the problem?
I would like to propose a quite different solution. First of all, I think we shouldn't use
setShouldPopAllStateOnUP. I see 1 flaw with that approach.If we open the status page from the sidebar avatar,
shouldPopAllStateOnUPwill be true. If we close the status page by pressing the overlay,shouldPopAllStateOnUPwill stay true (we only resetshouldPopAllStateOnUPwhen callinggoBack).Because it's still true if we open the status page from the profile page and press back, it will pop out all screens, even though it should go back to the profile page.
So, the solution I would like to propose is to have a different route path for the status page, depending on where we open it. If we open it from the sidebar avatar, we will navigate to
/status, but if we open it from the profile page, then we will navigate to the same route we have now, that is/settings/profile/status.App/src/pages/home/sidebar/AvatarWithOptionalStatus.js
Lines 38 to 39 in 3a44f77
Then, based on the current route, we can decide whether we need the fallback route or not.
Here is how you add the new route
ROUTES.ts(this is the route path)STATUS: 'status'SCREENS.ts(this is the route name)STATUS: 'Status'linkingConfig.ts(binding it up, you can add it aboveSCREENS.SETTINGS.PROFILE.STATUS)ModalStackNavigators.tsx, specifically inSettingsModalStackNavigatornavigator. (you can add it aboveSCREENS.SETTINGS.PROFILE.STATUS)106 remaining items
puneetlath commentedon Mar 14, 2024
I think we should close this out. The original bug isn't there anymore and I think what is shown in @mvtglobally's video is fine.
Thanks for your input everyone!
puneetlath commentedon Apr 18, 2024
Reopening this since the work was completed, so there should be some payment made. Being discussed here: https://expensify.slack.com/archives/C02NK2DQWUX/p1713323524607299
suneox commentedon Apr 21, 2024
Hi @puneetlath,
I believe that fair compensation is warranted for the time I spent investigating solutions, creating and updating the PR. This is because another contributor raised a regression issue that was not clearly communicated. Additionally, this contributor made multiple updates without notifying others after my solution works he also continued to update, and the reviewer also delayed reviewing the PR.
puneetlath commentedon May 4, 2024
Ok, I've reviewed the thread/PR and I think that @suneox is due compensation since they did do the work they were hired for, though we didn't end up using it.
I think @mananjadhav is due 50% compensation since they did partial work, but did not review/test the PR.
Payment summary:
C - @suneox - $500 - to be paid via Upwork
C+ - @mananjadhav $250 - to be paid via NewDot
@suneox can you please send me a link to your upwork profile?
@mananjadhav please request on NewDot.
mananjadhav commentedon May 4, 2024
Thanks @puneetlath. Agreed with the assessment.
suneox commentedon May 4, 2024
@puneetlath Thanks for recognizing the effort put into our work, here is my upwork profile
JmillsExpensify commentedon May 4, 2024
$250 approved for @mananjadhav
puneetlath commentedon May 4, 2024
Np y'all. Thanks for your patience. @suneox offer is here: https://www.upwork.com/nx/wm/offer/102163593
Please ping me on the issue when you've accepted it.
suneox commentedon May 4, 2024
@puneetlath I have accepted an offer. Thank you!
puneetlath commentedon May 4, 2024
Ok all paid. Thanks y'all!