Twake icon indicating copy to clipboard operation
Twake copied to clipboard

Update "bold" unread channel indicator

Open RomaricMourgues opened this issue 2 years ago • 2 comments

US: https://www.notion.so/linagora/Channel-badges-for-notification-5040af78c5224b509dbdedbf6f3733b6

If we need to display number of unread messages instead of the bold, then "last_increment" in user_member must be correctly updated (stuck at 0 currently)

RomaricMourgues avatar Sep 05 '22 07:09 RomaricMourgues

@BenoitTallandier ping here when designer have design update

RomaricMourgues avatar Sep 05 '22 07:09 RomaricMourgues

Hello, Here the design : https://www.figma.com/file/uLw3iWnOEGaRlJnfPz4Pv0/Twake.new?node-id=3322%3A164994 The US changed a bit. So let me know if it creates technical issue :)

BenoitTallandier avatar Sep 09 '22 07:09 BenoitTallandier

  1. All notifications are enabled, the unread message in the screenshot is a mention. If I understood the design and the US right, it should be displayed as a blue “@” when a person receives a single mention, the counter is currently displayed instead though. In fact, “@” is never displayed next to the counter when all notifications are enabled, it’s always just the counter. Screenshot 2022-09-26 at 15.48.14.png Screenshot 2022-09-26 at 15.48.29.png
  2. All notifications are disabled. The unread message in the screenshot is a mention. Should be displayed as a grey “@”, the counter is displayed instead.
    Screenshot 2022-09-26 at 15.49.25.png
  3. Only @you, @all, @here notifications are enabled, unread message is a single mention, I suppose it’s meant to be displayed without the counter. Screenshot 2022-09-26 at 15.42.36.png

tprudentova avatar Sep 26 '22 12:09 tprudentova

The 3rd one is right actually according to my reading of the user story @BenoitTallandier ?

For the second one it is also my understanding of the US, or something that must change in the US because muting a channel means that I can't be "mentioned" no ?

First one is definitively an error that's for sure.

RomaricMourgues avatar Sep 26 '22 14:09 RomaricMourgues

Considering 3: there isn't a specific case in the design for mentions only, but I considered the case of "all notifications enabled. single mention" from the design And I also underlined the situation for 2, check screenshot. But I suppose we need Benoit to sort this out :) Screenshot 2022-09-27 at 09.18.38.png

tprudentova avatar Sep 27 '22 06:09 tprudentova

Yes Benoit is needed, because else why not setting the notification level to @.***” except being grey instead of blue there is no difference. Or maybe the differences is in the push notification not being sent ? @benoit we need you :)

On 27 Sep 2022, at 08:23, tprudentova @.***> wrote:

 Considering 3: there isn't a specific case in the design for mentions only, but I considered the case of "all notifications enabled. single mention" from the design And I also underlined the situation for 2, check screenshot. But I suppose we need Benoit to sort this out :)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.

RomaricMourgues avatar Sep 27 '22 06:09 RomaricMourgues

For the 3rd topic : we should see only one "@" mention. Not the counter :)

BenoitTallandier avatar Sep 27 '22 07:09 BenoitTallandier

Oh for the 3 ok, what if there is 2 mentions then ? And my last comment was about the point 2, I also need a reply

RomaricMourgues avatar Sep 27 '22 07:09 RomaricMourgues

Here is the final logic:

--

First we now have different badges mentions_type:

  • "reply" - when it is a reply to a thread we are subscribed to
  • "mention" - when i am mentioned personnaly
  • "global" - when I am mentioned using @channel @all etc
  • "unread" - when I arbitrary set a channel as unread

--

  • "muted icon": notificationLevel === "none"
  • "bell icon": unreadBadges.length > 0
  • "@ icon" in GRAY: props.notificationLevel === 'none' && globalBadges + mentionsBadges + repliesBadges > 0
  • "@ icon" in BLUE: props.notificationLevel !== 'none' && globalBadges + mentionsBadges + repliesBadges > 0
  • "Counter": ((unreadMessages > 0 && globalBadges + mentionsBadges + repliesBadges === 0) || globalBadges + mentionsBadges + repliesBadges > 1)
  • "Counter" in GRAY: !(globalBadges + mentionsBadges + repliesBadges > 0 && notificationLevel !== "none" || notificationLevel === "all")
  • "Counter" in BLUE: globalBadges + mentionsBadges + repliesBadges > 0 && notificationLevel !== "none" || notificationLevel === "all"
  • "Counter" value: Math.max(globalBadges + mentionsBadges + repliesBadges, unreadMessages)

--

It starts to be hard to follow I hope it makes sense for the user at the end 😅

RomaricMourgues avatar Sep 27 '22 08:09 RomaricMourgues

Noticed a couple more bugs: 4. User A sends messages without tags, user B gets a notification like they've been mentioned. Screenshot 2022-09-28 at 13.57.16.png Screenshot 2022-09-28 at 13.57.08.png 5. User A tags user B in a message, user B gets a proper notification with a tag, but as soon as they open the chat, the @ changes to the counter. https://images.zenhubusercontent.com/271994210/bb758a9d-1cca-4fe6-b2d2-b23deabcbdcd/vid_20220928_135907_0_.mp4

tprudentova avatar Sep 28 '22 11:09 tprudentova

Thanks, moved to #2546 in order to validate this one for canary :)

RomaricMourgues avatar Sep 30 '22 06:09 RomaricMourgues