-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-01-17] Unsubscribe icon shows up after leaving your own thread #30546
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.The "Unsubscribe" context menu action is visible even after the thread was left. What is the root cause of that problem?The issue is that on leaving the thread, here: App/src/pages/home/HeaderView.js Lines 130 to 136 in fb0899f
We call this action: App/src/libs/actions/Report.js Lines 2011 to 2078 in a59d56f
But it doesn't update the What changes do you think we should make in order to solve the problem?First, we should update the BE behavior on the Second, he should add an optimistic Onyx if (report.parentReportID && report.parentReportActionID) {
const parentReportAction = ReportActionsUtils.getParentReportAction(report);
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.parentReportID}`,
value: {[parentReportAction.reportActionID]: {childReportNotificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN}},
});
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.parentReportID}`,
value: {[parentReportAction.reportActionID]: {childReportNotificationPreference: report.notificationPreference}},
});
} We do similar on the "Unsubscribe" action here: App/src/libs/actions/Report.js Lines 1387 to 1398 in a59d56f
What alternative solutions did you explore? (Optional)Instead of fixing the BE, we could just call |
ProposalPlease re-state the problem that we are trying to solve in this issue.Unsubscribe icon shows up after leaving your own thread What is the root cause of that problem?When clicking the subcribe or unsubcribe button on the ContextMenu modal. We will call toggleSubscribeToChildReport function to update Notification Preference
When leaving the thread, we don't call toggleSubscribeToChildReport to unsubscribe this thread What changes do you think we should make in order to solve the problem?When leaving the thread, we should call toggleSubscribeToChildReport to unsubscribe this thread like we did here App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 206 to 215 in e99c297
We also consider calling toggleSubscribeToChildReport to true when the user clicks the thread again after leaving the thread Optional: While investigating this issue I see a problem. Let's see the below image The unsubscribe button displayed on context menu modal even It is single message not thread (there are no child message). The RC is
we are using this condition to display unsubcribe button Solution: I suggest we add a condition to make sure it is a thread (Ex: childVisibleActionCount > 0). If It is true, we display unsubcribe or subcribe button What alternative solutions did you explore? (Optional) |
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. |
Triggered auto assignment to @conorpendergrast ( |
Bug0 Triage Checklist (Main S/O)
|
I got a deploy blocker GH issue today that was a duplicate of this issue, so I've closed that one and added the relevant labels to this issue instead. |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Current assignee @srikarparsi is eligible for the Engineering assigner, not assigning anyone new. |
I spoke with @MitchExpensify, neither of us think that this needs to be a deploy blocker. I'm going to leave assigned to @srikarparsi and demote back to daily, and switch the assigned BZ member from me to Mitch. |
How is this coming along @srikarparsi ? |
Got it working! In review now :) |
Nice one! |
This issue has not been updated in over 15 days. @ntdiary, @MitchExpensify, @srikarparsi eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Good to close @srikarparsi ? |
PR is in review |
Hi, @MitchExpensify, can you please assign this issue to @situchan? 😄 |
Done |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-4 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-01-17. 🎊 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
BugZero Checklist (@MitchExpensify)
|
Offer here for you @situchan https://www.upwork.com/nx/wm/offer/100498634 |
paid and contract ended! Closing |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.93-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers): N/A
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: @srikarparsi and Applause
Slack conversation: N/A
Issue found when executing PR #27994
Action Performed:
Break down in numbered steps
Expected Result:
Describe what you think should've happened
The subscribe icon should show up
Actual Result:
Describe what actually happened
The unsubscribe icon shows up instead
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Yes
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2023-10-27.at.4.49.30.PM.mov
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: