Skip to content
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] Unread chats are not shown bold but shown as unread when search #38704

Closed
1 of 6 tasks
m-natarajan opened this issue Mar 20, 2024 · 39 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Needs Reproduction Reproducible steps needed

Comments

@m-natarajan
Copy link

m-natarajan commented Mar 20, 2024

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:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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: @iwiznia
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1710873829984469

Action Performed:

  1. Go to staging.new.expensify.com and sign in
  2. Click on search icon
  3. See there is an unread message in #social public room
  4. Go to LHN

Expected Result:

#social public room should have unread indicator

Actual Result:

It does not show as unread
LHN is correct as there are many unread messages in the chat page.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
image (12)
image (15)
image (14)
image (13)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0177e0a39535aa44ec
  • Upwork Job ID: 1783231919721689088
  • Last Price Increase: 2024-05-08
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Mar 20, 2024
Copy link

melvin-bot bot commented Mar 20, 2024

Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@trjExpensify
Copy link
Contributor

@dylanexpensify I'm heading out until the 2nd. Can I hand you this over to progress? I was wondering if it's related to #36075. Said differently, I don't know how this bug wasn't caught in the development of the fix for the other one really.

@melvin-bot melvin-bot bot removed the Overdue label Mar 25, 2024
@dylanexpensify
Copy link
Contributor

@trjExpensify you got it! Will look into this today! Feel free to assign over!

@trjExpensify
Copy link
Contributor

Ta!

@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@dylanexpensify
Copy link
Contributor

waiting for someone to ping in social lol

@melvin-bot melvin-bot bot removed the Overdue label Apr 2, 2024
Copy link

melvin-bot bot commented Apr 5, 2024

@dylanexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Apr 5, 2024
@dylanexpensify
Copy link
Contributor

reviewing today!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 9, 2024
@dylanexpensify
Copy link
Contributor

Having a hard time reproducing to be honest. Logging in takes me automatically to social. And I'm seeing LHN act according as it should.

@melvin-bot melvin-bot bot removed the Overdue label Apr 12, 2024
@dylanexpensify
Copy link
Contributor

@m-natarajan can you still repro?

@iwiznia
Copy link
Contributor

iwiznia commented Apr 12, 2024

I can
image
Maybe because of this?
image

@melvin-bot melvin-bot bot added the Overdue label Apr 15, 2024
@dylanexpensify
Copy link
Contributor

Ahhh nice shout @iwiznia! I'll give it a try with that.

@melvin-bot melvin-bot bot removed the Overdue label Apr 15, 2024
@puneetlath
Copy link
Contributor

I also reported similar here: https://expensify.slack.com/archives/C049HHMV9SM/p1713218931132899

@melvin-bot melvin-bot bot added the Overdue label Apr 17, 2024
Copy link

melvin-bot bot commented Apr 24, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (External)

@fitd-tech
Copy link

fitd-tech commented Apr 25, 2024

Hello Expensify team! I'd like to make a proposal for this (my first!), but I'm trying to understand the issue fully.

Please re-state the problem that we are trying to solve in this issue.
It seems that when there is unread activity in a muted channel, it is not bold in the LHN. However, if you go to Search and find the same channel, it will be bold to indicate the activity.

What is the root cause of that problem?
If my understanding is correct, my proposal involves altering the variable definition for textUnreadStyle in the OptionRowLHN component. This definition contains a condition that doesn't apply the unread text style if the user has muted notifications. I'm not sure why this was done, since muting notifications doesn't seem to mean the user shouldn't see the bold text indication (only that they don't get notifications for it).

What changes do you think we should make in order to solve the problem?
I would like to remove the condition to check for muted notifications from this definition, as long as it is indeed incorrectly placed.

What alternative solutions did you explore? (Optional)
I looked into the the reason the search results are in bold, and it seems to support my proposal. The report is generated to assign any occurrence of isUnread to isBold and InviteMemberListItem looks for isBold alone to assign the respective styles. There is no check for muted notifications here.

Thanks for your consideration!

(edited to use the proposal template provided)

Copy link

melvin-bot bot commented Apr 25, 2024

📣 @fitd-tech! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@fitd-tech
Copy link

Contributor details
Your Expensify account email: tony@fitd.tech
Upwork Profile Link: https://www.upwork.com/freelancers/~0112f1c05cee2d1939

Copy link

melvin-bot bot commented Apr 25, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@Ollyws
Copy link
Contributor

Ollyws commented Apr 26, 2024

So it seems to me that the problem here is that we intentionally don't bold new messages if the notifications are muted (#33779) but we only do this for OptionRowLHN resulting in an inconsistency between the LHN and the seach list.

@fitd-tech Thanks for the proposal, it's going in the right direction but I think we want to preserve the current behaviour for the LHN.

@fitd-tech
Copy link

Thanks @Ollyws! Let me know if I can do anything further.

@Ollyws
Copy link
Contributor

Ollyws commented Apr 26, 2024

Feel free to update your proposal so that neither the LHN or search list are bolded when notifications are muted.

@fitd-tech
Copy link

fitd-tech commented Apr 26, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

The search list shows items with new activity in bold, even if they have been muted. The LHN does not show this activity, and we would like them to be consistent, so we should remove the bold styling from the search results when notifications are muted. (This description is the inverse of the original bug report, but seems more in line with our intent)

What is the root cause of that problem?

In the OptionRowLHN component, we check the user notification settings to determine whether we will apply bold styles to the list items:

const textUnreadStyle = optionItem?.isUnread && optionItem.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.MUTE ? [textStyle, styles.sidebarLinkTextBold] : [textStyle];

In the ChatFinderPage component of the search function, we set a flag for isBold on each result without checking the user settings first:

if (recentReports?.length > 0) {
newSections.push({
data: recentReports.map((report) => ({...report, isBold: report.isUnread})),
shouldShow: true,
});
}

What changes do you think we should make in order to solve the problem?

I would like to add the same settings condition to the ChatFinderPage component sections list, so the InviteMemberListItem component only applies bold styling if the user hasn't muted notifications.

What alternative solutions did you explore? (Optional)

I could add this check to the InviteMemberListItem component instead:

<TextWithTooltip
shouldShowTooltip={showTooltip}
text={Str.removeSMSDomain(item.text ?? '')}
style={[
styles.optionDisplayName,
isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText,
item.isBold !== false && styles.sidebarLinkTextBold,
styles.pre,
item.alternateText ? styles.mb1 : null,
]}
/>

...but since semantically we are setting isBold, I would prefer that is only true if the item will actually be rendered in bold.

@melvin-bot melvin-bot bot added the Overdue label Apr 29, 2024
@dylanexpensify
Copy link
Contributor

@Ollyws can we get an update on the updated proposal? 🙇‍♂️

@melvin-bot melvin-bot bot removed the Overdue label Apr 29, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Apr 29, 2024

@fitd-tech's proposal LGTM, but we should get clarificaion from the internal engineer that this is absolutely the desired behaviour because as @fitd-tech mentioned it is kind of the inverse of the actual bug report.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 29, 2024

Triggered auto assignment to @tylerkaraszewski, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@dylanexpensify
Copy link
Contributor

Bump @tylerkaraszewski to review

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

Copy link

melvin-bot bot commented May 1, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label May 3, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

Copy link

melvin-bot bot commented May 7, 2024

@tylerkaraszewski, @Ollyws, @dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

@dylanexpensify
Copy link
Contributor

@Ollyws can you repro? I can't

@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
@Ollyws
Copy link
Contributor

Ollyws commented May 8, 2024

@dylanexpensify I can still reproduce, the issue is that when we set the notification preference to mute the chat is still bolded in the search but not in the LHN.

Copy link

melvin-bot bot commented May 8, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label May 10, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Third week)

Copy link

melvin-bot bot commented May 13, 2024

@tylerkaraszewski, @Ollyws, @dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

9 participants