HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Notification pop-ups only show for a few seconds

edited August 2021 in Vanilla 3.x Help

Pop-up notifications for things like @mentions and bookmarks are only showing for 5 seconds. I've had users claiming the feature isn't working, no doubt because they're not spotting it in time (e.g. leaving forum open and looking away for a few moments).

Is this some sort of bug? Any ideas on how to make these notifications persistent?

Version: 3.3

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    7 seconds. And I'd say that's not a bad decision, because this is is not a push service. So if your users are going away for hours and they return, they haven't received / missed any notification at all. The notifications only show up when they reload the page or browse to another page in your forum.

    Given that everything works as intended, your users will a) need to refresh a page before they see notifications and b) have 7 seconds after a page refresh to get aware of the notifications.

    But Vanillas global JavaScript functions can be overwritten quite easily. If you want to change that 7 seconds, you need to create a plugin (or extend your custom theme if you have got one) to insert a small js file which copies the setAutodismiss method and only alter the timeout interval.

    Since this is quite trivial, it would be a good beginner plugin. If you like to, I would assist you in creating that by yourself.


    But although it's easy, I wouldn't recommend it. The default behaviour should be okay for everybody and not everything needs to be tweaked. If there are users who do not see those notifications, ask them to open the JavaScript console and look for errors which might prevent the notifications from showing up.

  • edited September 2021

    Thanks for the detailed explanation and the offer to assist with a plugin.

    I think 7 seconds makes sense for the more trivial notifications like topic, board and bookmark updates. But @mentions are on another level of importance to the user. You want to see who is talking about you in that moment rather than leave it. So I think it makes sense that those are persistent until the destination is clicked into.

    Is it possible for a plugin to only increase the time on @mention pop-ups or would it have to apply to all?

  • edited September 2021

    @Kaspar Are you referring to the notification feed?

    The pop-ups are the only way my users know they are mentioned unless they have enabled email notifictions.

    The forum profile is not available to them, neither is the feed. Usernames link directly to their main site profile.

  • edited September 2021

    (reposted below due to overlap)

  • R_JR_J Ex-Fanboy Munich Admin

    The approach would be more or less the same. This is the function that you need to replace with your plugin https://github.com/vanilla/vanilla/blob/release/3.3/js/global.js#L865-L876

    Instead of simply changing that function so that the timeout check is skipped or extending the timeout period, you would need to add some regex so that you are able to distinguish between mention-notifications and others.

    I could help you how to replace the function with a plugin, but you would have to figure out by yourself how to determine if a notification is a mention notification. When it comes to js, my qualification as an advisor is as good as your favorite internet search service...

  • edited September 2021

    Really appreciate your offer to help there, thanks.

    I'm starting to think users are complaining because of an issue with the pop-up not always showing. I just experienced this first hand - someone mentioned me and I never saw a pop-up.

    Have you heard of anyone else having this be an issue? Any idea what could cause such a thing?

  • R_JR_J Ex-Fanboy Munich Admin

    When fiddling around how the initial problem could be solved, I haven't received all notifications that I expected. I haven't looked closer at that because my impression has been that double notifications simply are not send.

    So if I mention you in this discussion in more than one comment, you would only be notified about the second mention if some other notification has come in inbetween.

    But that's only speculation

  • edited September 2021

    Oh I wouldn't mind if it was just a case of there being a max of one mention notification per thread or along those lines.

    But it seems to be a case of it sporadically not triggering at all. Earlier on my website I was mentioned for the first time in a new thread, I did not get a pop-up at all. Only saw my name by chance.

    I noticed in the V4 release notes it says "Remove legacy Vanilla notifications queueing". I wonder if that might address this issue.

Sign In or Register to comment.