-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-02-07] [$500] Thread - "Join" button appear when user Leave thread #34820
Comments
Job added to Upwork: https://www.upwork.com/jobs/~012a09bc563f2546c1 |
Triggered auto assignment to @lschurr ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
We think that this bug might be related to #vip-vsb. |
ProposalPlease re-state the problem that we are trying to solve in this issue."Join" button appear when user Leave thread What is the root cause of that problem?Below are the conditions that need to be met to show the App/src/pages/home/HeaderView.js Lines 155 to 156 in 56fb814
What changes do you think we should make in order to solve the problem?We need to check if navigation is in progress, we can use What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
ProposalPlease re-state the problem that we are trying to solve in this issue."Join" button appear when user Leave thread What is the root cause of that problem?when leaving a room we change the reportID optimistically to App/src/libs/actions/Report.ts Line 2095 in 6c72ef8
and the join button is shown based on this condition: App/src/pages/home/HeaderView.js Lines 156 to 157 in 7b1035c
so when leaving a thread the What changes do you think we should make in order to solve the problem?we can pass the isReportReadyForDisplay from the App/src/pages/home/HeaderView.js Line 309 in 7b1035c
to: {canJoin && !isSmallScreenWidth && joinButton && props.isReportReadyForDisplay} alternativlywe can fix the isThreadChat function since it shouldn't return return Boolean(report?.reportID && report?.parentReportID && report?.parentReportActionID); |
ProposalPlease re-state the problem that we are trying to solve in this issue.The navigation on leaving Thread is delayed What is the root cause of that problem?First of all, I'd like to stress out that the issue is not only with the "Join" button but with the skeleton view as well. App/src/libs/actions/Report.ts Lines 2169 to 2177 in 56fb814
We wait until it's removed from Onyx, and then the user gets navigated automatically because the thread report no longer exists. And this moment between the report being deleted and the user being navigated is causing the behavior in this issue. What changes do you think we should make in order to solve the problem?We need to explicitly navigate the user to the parent report upon leaving the thread: if (isChatThread(report)) {
Navigation.goBack(ROUTES.HOME);
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.parentReportID));
} else if (isWorkspaceMemberLeavingWorkspaceRoom) {
const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]);
const chat = ReportUtils.getChatByParticipants(participantAccountIDs);
if (chat?.reportID) {
// We should call Navigation.goBack to pop the current route first before navigating to Concierge.
Navigation.goBack(ROUTES.HOME);
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID));
}
} Result:Screen.Recording.2024-01-19.at.19.00.15.movWhat alternative solutions did you explore? (Optional) |
Dupe of #31220 |
@ishpaul777 Thanks for the proposal. Your RCA makes sense however the solution is a workaround. I don't see how the screen being focused or not should control the visibility of the join/leave buttons. |
@abzokhattab Your proposal does not follow the template, it's incomplete (missing a clear RCA). |
@paultsimura Thanks for the proposal. Regarding your RCA:
This is not exactly true. The bug can be reproduced whether we navigate explicitly or not. This is because both navigation and Onyx updates are async. Doing one after the other does not guarantee any order. |
@DylanDylann I agree this could have been handled in the linked issue. I checked your proposal. The RCA is correct. The suggested solution does not fix the problem but the alternative solution does. Except that we should check the existence of the report id instead of the "emptiness" of the report. This is because optimistically the report would still be there. Please update/copy the proposal from other issue and tag me once done |
@abzokhattab Thanks for the update. The RCA makes sense. As for the solution I don't think we should use |
@DylanDylann Can you please post the proposal here |
ProposalPlease 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?
What alternative solutions did you explore? (Optional)
|
@DylanDylann Thank you. Let's go with updating the 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Looks pretty good. Please go ahead and get started. |
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-02-07. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
|
Payment summary:
|
This is complete. |
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: 1.4.28-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:
Expected Result:
User should navigate back to the parent conversation with no visual issues
Actual Result:
"Join" button appear when user Leave thread
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6347846_1705683544658.az_recorder_20240119_170154.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: