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

Don't show notifications for messages already appearing on screen #3114

Open
borisyankov opened this issue Nov 6, 2018 · 13 comments
Open

Don't show notifications for messages already appearing on screen #3114

borisyankov opened this issue Nov 6, 2018 · 13 comments

Comments

@borisyankov
Copy link
Contributor

borisyankov commented Nov 6, 2018

[edit: see refinements below] If the app is on-screen, currently being used, do not show notifications!

@borisyankov borisyankov self-assigned this Nov 6, 2018
@kunall17
Copy link
Contributor

We can use the setting notification when online for this one?

@borisyankov
Copy link
Contributor Author

We did have a bug and a fix for that very recently.
3d57065
Quite possible that this solves the issue completely.
But we can also add custom logic to not show the notification.

@chrisbobbe
Copy link
Contributor

@gnprice @ray-kraesig, are you aware of notifications showing up when the app is active?

Note that this is distinct from #3119, which reports that we can reduce the volume of notifications by removing those for messages we've read on the web.

@gnprice
Copy link
Member

gnprice commented Feb 13, 2020

Chris and I experimented a bit (with his iPhone, on chat.zulip.org) and determined that the behavior here isn't quite anything I thought it was. :-)

In particular we didn't actually succeed in reproducing getting a notification while the app was on the screen. This even after he set "Send mobile notificatinos even if I'm online" to true.

So the first step in doing something here will be to try to pin down what the existing pattern of behavior is for how notifications interact with the app already being open.

Stepping back to the original description / request: I think it's actually important that there should be a notification when you get a (notifiable) message, even when you're actively using the app -- if you're using it in some other narrow, or anywhere else that means you're not going to immediately see the message in the app. We wouldn't want it to be the case that when you're actively using the app, that causes you to not see PMs unless you keep actively checking for them.

But I do think it's a not-great experience if you're actively participating in a PM thread, and you keep getting a ding and a banner for every message the other / another person sends in the thread. The ideal behavior here might be: when you're looking at a message list, suppress notifications for messages that would appear in that same message list.

@timabbott
Copy link
Member

Yeah, I believe that's the right UX design.

@timabbott
Copy link
Member

Just to extend that commentary, what we do in the webapp is we suppress notifications for messages that appear onscreen; which is a bit different from being in the message list (but I think matches the user expectation for whether it's annoying or useful to get a ding).

@gnprice
Copy link
Member

gnprice commented Feb 21, 2020

Yeah, that makes sense. That might be the ideal behavior for the mobile app, too.

One difference from web is that we have the "N unreads" banner, which is prominent at the top of the screen (in the same general area a notification would appear, in fact) in a way that the counts in the left sidebar aren't. But, when I think about situations where this would arise -- like I'm catching up on a long thread, and someone @-mentions me in it, down below what's onscreen -- I feel like I do want the notification.

@gnprice gnprice changed the title Do not show notifications if the app is active Don't show notifications for messages already appearing on screen Apr 9, 2020
@gnprice
Copy link
Member

gnprice commented Jun 29, 2020

Bump to mention that we've heard a complaint about this on czo.

@gnprice
Copy link
Member

gnprice commented Sep 16, 2020

The same user who highlighted this issue for us a few months ago has provided a video. It shows that the behavior they're currently seeing is the same one originally reported in this issue, unlike what we saw in experiments described above at #3114 (comment) .

Specifically:

  • they're looking at a PM conversation narrow
  • they get a message in that conversation; it appears in the message list, and gets marked as read
  • then a few moments later, a notification appears.

I suspect that what we're seeing is an OS difference. That video shows an Android device; the experiment above was on iOS. So I suspect the situation is:

  • On Android, we're showing notifications even when the app is in the foreground (and even when in fact the very same message appears on-screen in the app.)
  • On iOS, we're not showing notifications when the app is in the foreground at all (regardless of whether the app is currently showing that conversation or only some entirely unrelated conversation.)

The behavior we want is a mix of these, where whether we show a notification depends on whether the message will already be shown on-screen. This will require implementing some new logic in order to be able to use that information when determining what notifications to show.

@chrisbobbe
Copy link
Contributor

I suspect that what we're seeing is an OS difference.

I agree.

This will require implementing some new logic in order to be able to use that information when determining what notifications to show.

Correct; I've got a few bullet points to brainstorm at #4241 (comment).

@andreasoc
Copy link

any update?

@chrisbobbe
Copy link
Contributor

No, sorry, @andreasoc. Progress on iOS notification work is stalled on #4115 (comment).

chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 14, 2021
On iOS, for zulip#4897, we instead want to use the native
notification-sound functionality. So, do that, by adding a line to
AppDelegate.m.

We should still carve out an exception: we won't need to notify the
user if the relevant item (a new or updated message) is already on
the user's screen. Doing so could be annoying; for example, you
don't need to be notified about every single message in an active PM
conversation. That's issue zulip#3114, and it'll take some work. But this
change improves the behavior on iOS and it matches the existing
behavior on Android.

On Android, this JS function call has apparently been duplicating
the notification sound that gets played at a lower level, so it's
fine for Android to remove this.

Fixes: zulip#4897
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 26, 2021
On iOS, for zulip#4897, we instead want to use the native
notification-sound functionality. So, do that, by adding a line to
AppDelegate.m.

We should still carve out an exception: we won't need to notify the
user if the relevant item (a new or updated message) is already on
the user's screen. Doing so could be annoying; for example, you
don't need to be notified about every single message in an active PM
conversation. That's issue zulip#3114, and it'll take some work. But this
change improves the behavior on iOS and it matches the existing
behavior on Android.

On Android, this JS function call has apparently been duplicating
the notification sound that gets played at a lower level, so it's
fine for Android to remove this.

Fixes: zulip#4897
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 29, 2021
On iOS, for zulip#4897, we instead want to use the native
notification-sound functionality. So, do that, by adding a line to
AppDelegate.m.

We should still carve out an exception: we won't need to notify the
user if the relevant item (a new or updated message) is already on
the user's screen. Doing so could be annoying; for example, you
don't need to be notified about every single message in an active PM
conversation. That's issue zulip#3114, and it'll take some work. But this
change improves the behavior on iOS and it matches the existing
behavior on Android.

On Android, this JS function call has apparently been duplicating
the notification sound that gets played at a lower level, so it's
fine for Android to remove this.

Fixes: zulip#4897
gnprice pushed a commit to gnprice/zulip-mobile that referenced this issue Sep 10, 2021
On iOS, for zulip#4897, we instead want to use the native
notification-sound functionality. So, do that, by adding a line to
AppDelegate.m.

We should still carve out an exception: we won't need to notify the
user if the relevant item (a new or updated message) is already on
the user's screen. Doing so could be annoying; for example, you
don't need to be notified about every single message in an active PM
conversation. That's issue zulip#3114, and it'll take some work. But this
change improves the behavior on iOS and it matches the existing
behavior on Android.

On Android, this JS function call has apparently been duplicating
the notification sound that gets played at a lower level, so it's
fine for Android to remove this.

Fixes: zulip#4897
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Sep 10, 2021
On iOS, for zulip#4897, we instead want to use the native
notification-sound functionality. So, do that, by adding a line to
AppDelegate.m.

We should still carve out an exception: we won't need to notify the
user if the relevant item (a new or updated message) is already on
the user's screen. Doing so could be annoying; for example, you
don't need to be notified about every single message in an active PM
conversation. That's issue zulip#3114, and it'll take some work. But this
change improves the behavior on iOS and it matches the existing
behavior on Android.

On Android, this JS function call has apparently been duplicating
the notification sound that gets played at a lower level, so it's
fine for Android to remove this.

Fixes: zulip#4897
@andreasoc
Copy link

CZO discussion with some details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants