-
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
[$250] Self DM - Self DM is not bolded in LHN after it is marked as unread #51362
Comments
Triggered auto assignment to @blimpich ( |
💬 A slack conversation has been started in #expensify-open-source |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
I have a meeting right now but will look into this right after the meeting |
|
Demoting because I don't think this is deploy blocker worthy |
ProposalPlease re-state the problem that we are trying to solve in this issue.Self DM - Self DM is not bolded in LHN after it is marked as unread What is the root cause of that problem?When marking the self dm as unread, we will return bold text if the notificationPreference is not equal to mute and also not equal to hidden and the App/src/libs/OptionsListUtils.ts Lines 2568 to 2571 in 5e975f5
But for selfDM the notificationPreference will always return mute, see here Lines 1217 to 1219 in 5e975f5
What changes do you think we should make in order to solve the problem?Right here we can check if the report is self dm, then we will only check if the notificationPreference is not equal to hidden and the function shouldUseBoldText(report: ReportUtils.OptionData): boolean {
const notificationPreference = ReportUtils.getReportNotificationPreference(report);
if (ReportUtils.isSelfDM(report)) {
return report.isUnread === true && notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
}
return report.isUnread === true && notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE && notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
} What alternative solutions did you explore? (Optional) |
Gonna mark this as external since I don't know what PR caused it. @NJ-2020 as part of your proposal can you state what PR caused this regression in the first place? |
Job added to Upwork: https://www.upwork.com/jobs/~021849224049457734741 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi ( |
Triggered auto assignment to @anmurali ( |
@blimpich I think this could be NAB, because inside the production code we will show the bold text if the notificationPreference is not equal to mute But inside the shouldUseBoldText function we only check for App/src/libs/OptionsListUtils.ts Lines 2552 to 2554 in 4d4179b
This if statement will not run if the second param value is true because Lines 1226 to 1229 in 4d4179b
We will return either the report?.participants?.[currentUserAccountID ?? -1]?.notificationPreference or HIDDEN value, but right now in the production code the report?.participants?.[currentUserAccountID ?? -1] returns null value which will return the HIDDEN valueLine 1230 in 4d4179b
Why the
And we're using the SidebarUtils.getOptionData function to get the optionItem valueApp/src/components/LHNOptionsList/OptionRowLHNData.tsx Lines 43 to 46 in 4d4179b
But inside the production code we don't set any participants value for the report, instead we use the participantsList Line 520 in 4d4179b
So in this production code we're using the Line 1230 in 4d4179b
|
We have the same issue before here too |
Ah, I see, this actually makes a lot of sense. Based off looking at this PR this isn't a bug, its the intended behavior. Thank you @NJ-2020 and @bernhardoj for helping me understand this. I will try to get applause to not mark this as a bug in the future. |
@anmurali @blimpich Be sure to fill out the Contact List! |
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: 9.0.53-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): javascript:
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Self DM will be bolded in LHN after it is marked as unread
Actual Result:
Self DM is not bolded in LHN after it is marked as unread
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6643712_1729715829826.self_dm_unread.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mkhutornyiThe text was updated successfully, but these errors were encountered: