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
[$2000] Back from user details opens group chat instead of group details on android chrome #23935
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Click back button in app and observe that it open group chat instead of group details page as we do on web chrome
Expected Result:
App should open group details page on back from user report if we open user report from group details page
Actual Result:
App opens group report instead of group details page on back from user report if we open user report from group details page on android chrome
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.47-3 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 Notes/Photos/Videos: Any additional supporting documentation
changed the title [-] Inconsistency bug: back from user details opens group chat instead of group details on android chrome[/-][+]Back from user details opens group chat instead of group details on android chrome[/+]on Jul 31, 2023
Please re-state the problem that we are trying to solve in this issue.
The issue at hand involves incorrect navigation behavior in Android Chrome: the application returns to the group chat instead of the group details page after messaging a user from the details page.
What is the root cause of that problem?
The root cause of this problem lies in the navigateToAndOpenReportWithAccountIDs function. When this function is called upon clicking the 'message' button, it dismisses the current Right Hand Navigation (RHN) screen, causing it to be wiped from the navigation history. As a result, when the back button is pressed, the application doesn't navigate back to the group details page (as it's no longer in the history stack), and instead opens the group chat.
What changes do you think we should make in order to solve the problem?
To fix this issue, we should modify the navigateToAndOpenReportWithAccountIDs function to navigate to the new report route instead of dismissing it. This way, the RHN screen (group details page in this case) will be kept in the navigation history and we can navigate back to it when the back button is pressed. Here's the proposed code modification:
function navigateToAndOpenReportWithAccountIDs(participantAccountIDs) {
let newChat = {};
const chat = ReportUtils.getChatByParticipants(participantAccountIDs);
if (!chat) {
newChat = ReportUtils.buildOptimisticChatReport(participantAccountIDs);
}
const reportID = chat ? chat.reportID : newChat.reportID;
// We want to pass newChat here because if anything is passed in that param (even an existing chat), we will try to create a chat on the server
openReport(reportID, [], newChat, '0', false, participantAccountIDs);
Navigation.navigate(ROUTES.getReportRoute(reportID));
}
This fix, however, will highlight another issue: the inability to select the Left Hand Navigation (LHN) after the RHN is closed, due to an improperly positioned 'nodropzone' element. This will require a separate fix. The root cause of this issue should be investigated, and the position or behavior of the 'nodropzone' element should be adjusted accordingly to allow proper interaction with the LHN after the RHN is closed. #23885 #23881
* This will find an existing chat, or create a new one if none exists, for the given accountID or set of accountIDs. It will then navigate to this chat.
*
* @param {Array} participantAccountIDs of user logins to start a chat report with.
Now we create a isSmallDevice constant which is basically this conditions Browser.isMobile() || isSmallScreenWidth and use it to decide whether to push the report to navigation state or not.
Finally we update Report.navigateToAndOpenReportWithAccountIDs([accountID]) to Report.navigateToAndOpenReportWithAccountIDs([accountID], !isSmallDevice, isSmallDevice) in ProfilePage.js File.
What alternative solutions did you explore? (Optional)
This fix, however, will highlight another issue: the inability to select the Left Hand Navigation (LHN) after the RHN is closed, due to an improperly positioned 'nodropzone' element. This will require a separate fix. The root cause of this issue should be investigated, and the position or behavior of the 'nodropzone' element should be adjusted accordingly to allow proper interaction with the LHN after the RHN is closed. #23885 #23881
The issue mentioned at the bottom might be fixed by this PR
changed the title [-][$1000] Back from user details opens group chat instead of group details on android chrome[/-][+][$2000] Back from user details opens group chat instead of group details on android chrome[/+]on Aug 15, 2023
@jliexpensify I see no comments/reply is given to the current 2 proposals, are you sure those are not working/not acceptable?
note: asking because I gave good efforts on an issue once but then an already existing proposal(that was posted before price doubling) was accepted.
I think this should have been discussed while navigation refactor. @mountiny can you please confirm that it's intentional to close all RHP modals (on mobile) when open DM chat by clicking "Message xxx" on profile page?
So the issue here is inconsistency - browser (or android device) back button goes to previous page (even RHP modal) correctly, while app back button goes to old screen skipping recent RHP modal pages.
@mountiny can you please confirm that it's intentional to close all RHP modals (on mobile) when open DM chat by clicking "Message xxx" on profile page?
I think this is fine and intentional to make sure that the LHN is closer in the stack
I am a little bit confused by this issue and honestly it feels so minor we could close this out. The mWeb / native discrepancies are hard
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
melvin-bot commentedon Jul 31, 2023
Triggered auto assignment to @michaelhaxhiu (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 31, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)[-] Inconsistency bug: back from user details opens group chat instead of group details on android chrome[/-][+]Back from user details opens group chat instead of group details on android chrome[/+]ygshbht commentedon Jul 31, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The issue at hand involves incorrect navigation behavior in Android Chrome: the application returns to the group chat instead of the group details page after messaging a user from the details page.
What is the root cause of that problem?
The root cause of this problem lies in the
navigateToAndOpenReportWithAccountIDsfunction. When this function is called upon clicking the 'message' button, it dismisses the current Right Hand Navigation (RHN) screen, causing it to be wiped from the navigation history. As a result, when the back button is pressed, the application doesn't navigate back to the group details page (as it's no longer in the history stack), and instead opens the group chat.App/src/libs/actions/Report.js
Lines 553 to 564 in 30fc9bf
What changes do you think we should make in order to solve the problem?
To fix this issue, we should modify the
navigateToAndOpenReportWithAccountIDsfunction to navigate to the new report route instead of dismissing it. This way, the RHN screen (group details page in this case) will be kept in the navigation history and we can navigate back to it when the back button is pressed. Here's the proposed code modification:This fix, however, will highlight another issue: the inability to select the Left Hand Navigation (LHN) after the RHN is closed, due to an improperly positioned 'nodropzone' element. This will require a separate fix. The root cause of this issue should be investigated, and the position or behavior of the 'nodropzone' element should be adjusted accordingly to allow proper interaction with the LHN after the RHN is closed.
#23885
#23881
jeet-dhandha commentedon Jul 31, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
navigateToAndOpenReportWithAccountIDsfunctionApp/src/libs/actions/Report.js
Lines 548 to 553 in 30fc9bf
Params:
shouldDismissModal- to dismiss the modalpushToNavigationState- to push the navigation state to the root statepushToNavigationStateis true. (Refer below code if needed).Code Changes
Now we create a
isSmallDeviceconstant which is basically this conditionsBrowser.isMobile() || isSmallScreenWidthand use it to decide whether to push the report to navigation state or not.Finally we update
Report.navigateToAndOpenReportWithAccountIDs([accountID])toReport.navigateToAndOpenReportWithAccountIDs([accountID], !isSmallDevice, isSmallDevice)inProfilePage.jsFile.What alternative solutions did you explore? (Optional)
ygshbht commentedon Jul 31, 2023
The issue mentioned at the bottom might be fixed by this PR
michaelhaxhiu commentedon Aug 3, 2023
Hm I can't reproduce this one on my android (pixel / android / google chrome / staging).
michaelhaxhiu commentedon Aug 3, 2023
screen-20230803-134952.mp4
Here's a recording. Am I missing a step here @dhanashree-sawant?
michaelhaxhiu commentedon Aug 3, 2023
I'm leaning toward closing this one as-is until we get more clarity around the steps to take.
22 remaining items
melvin-bot commentedon Aug 10, 2023
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
jliexpensify commentedon Aug 11, 2023
Not overdue, waiting on proposals
jliexpensify commentedon Aug 15, 2023
No proposals yet, going to double this.
[-][$1000] Back from user details opens group chat instead of group details on android chrome[/-][+][$2000] Back from user details opens group chat instead of group details on android chrome[/+]melvin-bot commentedon Aug 15, 2023
Upwork job price has been updated to $2000
himanshuragi456 commentedon Aug 15, 2023
@jliexpensify I see no comments/reply is given to the current 2 proposals, are you sure those are not working/not acceptable?
note: asking because I gave good efforts on an issue once but then an already existing proposal(that was posted before price doubling) was accepted.
aimane-chnaif commentedon Aug 15, 2023
I think this should have been discussed while navigation refactor.
@mountiny can you please confirm that it's intentional to close all RHP modals (on mobile) when open DM chat by clicking "Message xxx" on profile page?
aimane-chnaif commentedon Aug 15, 2023
So the issue here is inconsistency - browser (or android device) back button goes to previous page (even RHP modal) correctly, while app back button goes to old screen skipping recent RHP modal pages.
mountiny commentedon Aug 15, 2023
I think this is fine and intentional to make sure that the LHN is closer in the stack
I am a little bit confused by this issue and honestly it feels so minor we could close this out. The mWeb / native discrepancies are hard
jliexpensify commentedon Aug 16, 2023
@himanshuragi456 Hi there - it's the C+ that will consider proposals, I'm just here to push the issue along and issue payments!
Ok cool, going to close this one then - based of Vit's comment: