Twake
Twake copied to clipboard
Update "bold" unread channel indicator
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)
@BenoitTallandier ping here when designer have design update
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 :)
- 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.
- All notifications are disabled. The unread message in the screenshot is a mention. Should be displayed as a grey “@”, the counter is displayed instead.
- Only @you, @all, @here notifications are enabled, unread message is a single mention, I suppose it’s meant to be displayed without the counter.
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.
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 :)
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.
For the 3rd topic : we should see only one "@" mention. Not the counter :)
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
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 😅
Noticed a couple more bugs:
4. User A sends messages without tags, user B gets a notification like they've been mentioned.
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
Thanks, moved to #2546 in order to validate this one for canary :)