element-hq / element-x-ios

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.
https://element.io/labs/element-x
GNU Affero General Public License v3.0
426 stars 105 forks source link

iOS (and particularly watchOS) push notifs feel weird by advertising sender name in preference to room name (which may be missing) #1188

Open ara4n opened 1 year ago

ara4n commented 1 year ago

Steps to reproduce

  1. Receive a push from a group chat
  2. Push shows up in your watch with their name eg “Thib” and the icon of the room - but not the room name anywhere.
  3. Therefore it feels like a DM or something personal from Thib, when it isn’t.

Outcome

What did you expect?

pushes for messages in chatrooms shouldn’t feel like DMs

What happened instead?

i saw my watch light up 10 times with the word “Thib” but it was a random chat in a random room rather than Thib trying to get in touch

Your phone model

No response

Operating system version

No response

Application version

254

Homeserver

No response

Will you send logs?

Yes

ara4n commented 1 year ago

As another example, a lockscreen on the phone saying "You have one notification from Arthur and one from Dave" (where you can't even see the icon on the push) again implies that it's 1:1s rather than "You have one missed message in the Foo room, and one in the Bar room" which is actually what's going on.

Velin92 commented 1 year ago

I have an apple as soon as I have no more higher priority tasks I'll give a look into this.

ara4n commented 1 year ago

Two other related problems here: EIX pushes use an additional vertical line of screen real estate for no reason, which hinders their ergonomics (as you want to see as many notifs as possible in the notif manager):

IMG_0712

Also, some of the time pushes on iOS are missing the room name entirely - e.g. this looks like a DM, but it's actually from a 3-person room with an m.room.name event.

IMG_0713

Velin92 commented 1 year ago

Two other related problems here: EIX pushes use an additional vertical line of screen real estate for no reason, which hinders their ergonomics (as you want to see as many notifs as possible in the notif manager):

IMG_0712

Also, some of the time pushes on iOS are missing the room name entirely - e.g. this looks like a DM, but it's actually from a 3-person room with an m.room.name event.

IMG_0713

okay regarding the third notification, that room has likely the isDirect value set to true, because I see that the sender avatar is also being rendered in place of the room. In case isDirect is true, we render the notification as a DM. Could you check if that is the case?

Regarding the name of the room being the second row, that is actually the way Apple manages the communication notifications API we use in El-X that considers part of "groups" (in our case rooms), in fact is also the behaviour of WA. We could change this behaviour but it may break the grouping order of notifications (also this is tied to Siri Intents even if is not important as of right now). What is the desired behaviour for rendering pushes for rooms and DMs?

VolkerJunginger commented 1 year ago

Group-Pushes Here is an overview of group pushes from: Teams Telegram Slack WA Legaycy Element Element X

Slack, WA and EX are using the new communication notifications in the way it is described here https://developer.apple.com/documentation/usernotifications/implementing_communication_notifications#3878639 (if I get it right.)

So in terms of displaying group pushes I think we're good.

kongo09 commented 1 year ago

Can we bring this back to the original point of the watch display, please?

VolkerJunginger commented 1 year ago

watch IMG_CDF36180E89D-1

I cannot confirm that. Attached a screenshot from a group chat. The watch does the same as the phone.

VolkerJunginger commented 1 year ago

So we are left with this "(...) that room has likely the isDirect value set to true, because I see that the sender avatar is also being rendered in place of the room. In case isDirect is true, we render the notification as a DM."

This is unfortunately the drawback of not having real DMs / no reliable source if a chat room with a DM flag set to true is actually a 1:1 chat.

ara4n commented 1 year ago

I cannot confirm that. Attached a screenshot from a group chat. The watch does the same as the phone.

The problem comes when watchOS or iOS summarises notifs - eg when flashing up a fullscreen alert on watchOS, or when it summarises multiple notifications. This is surprisingly hard to catch in the act, as the act of taking a screenshot makes the watch switch to the normal expanded notification view. In this example, you can see the summary view ("Workable & Activity") animating off the top to reveal the individual expanded notifs below:

image

Now, with the current push notifs on watchOS, this would say something like "Norbert Jocz & Workable" if the notif was from EX. For instance, here's a notif summary on iOS16:

image

However, it's really not helpful to know that I missed a msg from Norb in some random room (which is not a DM, nor is tagged as one - this msg turned out to be in a large internal chatroom). Instead, as a user, I want to see the name of the room too: "Norbert in Element Internal" or whatever.

Now, I understand that we are using the API "correctly" according to Apple - but practically speaking Apple is being dumb in how they display the notifs. So I think we should put the room name in the heading rather than the designated field, in order to make one-liner push summaries useful and actionable.

@volkerjunginger Make sense?

Velin92 commented 1 year ago

Group-Pushes Here is an overview of group pushes from: Teams Telegram Slack WA Legaycy Element Element X

Slack, WA and EX are using the new communication notifications in the way it is described here https://developer.apple.com/documentation/usernotifications/implementing_communication_notifications#3878639 (if I get it right.)

So in terms of displaying group pushes I think we're good.

@VolkerJunginger Could you check these comparisons that you just showed us with the latest test cases shown by @ara4n on Apple Watch if you have one (and for the not disturb state)? otherwise I can try to resurrect my old one and check this myself.

Because I am starting to wonder if Telegram and Teams do actually avoid using the sbutitle (wuich is used in the Apple API to identify the group) to essentially fix this UX issue from Apple.

ara4n commented 1 year ago

I managed to catch this properly in the act at last thanks to my watch being locked (normally the act of raising your wrist to take a screenshot causes the screen to 'unlock' and show the detailed push rather than the summary):

incoming-C320E9ED-984C-424F-B12A-4EBC82992328

On one hand, it's more useful to see 'Amandine' than it is to see 'Element X'. On the other hand, it incorrectly makes it look like she was DMing me, which would then require urgent triage, when in practice this was a notif for some random internal room. The important thing would have been to say "you have messages in Foo Room" rather than "Amandine is messaging you!!!"

...which is what this bug was about in the first place.

Because I am starting to wonder if Telegram and Teams do actually avoid using the sbutitle (wuich is used in the Apple API to identify the group) to essentially fix this UX issue from Apple.

^ Yes, I think this may well be what's happening. Apple's intended API is all very well, but it actually sucks usabilitywise in practice, at least in their current implementation.

ara4n commented 1 year ago

caught this in the act without my watch being locked:

image

This was a totally random msg from SamR in some support room - and yet it comes up looking like a DM.