[notifications] configurable? notification expiry time #11

Closed
opened 2022-06-23 16:37:23 +00:00 by amolith · 2 comments

One of my biggest annoyances with PleromaFE is that desktop notifications ignore my notification daemon's default expiry time and disappear after only a couple seconds.

I prefer to dismiss notifications manually because I like to finish what I'm doing before shifting my attention to the notification; by the time I've finished what I'm focused on, I usually only have time to read a couple words which means I need to go back to my browser and find the tab to finish reading it, rather than just reading the notification itself.

It would be nice if the expiry time was configurable with an option to disable expiry, but I would also be satisfied with just an option to disable the expiry and defer dismissal to the OS.

I've also posted this issue in pleroma/pleroma-fe on Gitlab in case it would be better resolved there.
https://git.pleroma.social/pleroma/pleroma-fe/-/issues/1169

One of my biggest annoyances with PleromaFE is that desktop notifications ignore my notification daemon's default expiry time and disappear after only a couple seconds. I prefer to dismiss notifications manually because I like to finish what I'm doing before shifting my attention to the notification; by the time I've finished what I'm focused on, I usually only have time to read a couple words which means I need to go back to my browser and find the tab to finish reading it, rather than just reading the notification itself. It would be nice if the expiry time was configurable with an option to disable expiry, but I would also be satisfied with just an option to disable the expiry and defer dismissal to the OS. I've also posted this issue in `pleroma/pleroma-fe` on Gitlab in case it would be better resolved there. https://git.pleroma.social/pleroma/pleroma-fe/-/issues/1169
Contributor

c71405ccad/src/services/desktop_notification_utils/desktop_notification_utils.js (L6-L8)

  // Chrome is known for not closing notifications automatically
  // according to MDN, anyway.
  setTimeout(desktopNotification.close.bind(desktopNotification), 5000)

seems like this was added on purpose?

in any case, this was done two years ago, and there's a good chance this apparent issue in chrome is fixed.
I think it's not the web app's job to handle closing notifications, so I don't see the reason to make it a toggle -- we can just remove that altogether

https://akkoma.dev/AkkomaGang/pleroma-fe/src/commit/c71405ccad6d154c8506424f2c035950d726423b/src/services/desktop_notification_utils/desktop_notification_utils.js#L6-L8 ```js // Chrome is known for not closing notifications automatically // according to MDN, anyway. setTimeout(desktopNotification.close.bind(desktopNotification), 5000) ``` seems like this was added on purpose? in any case, this was done two years ago, and there's a good chance this apparent issue in chrome is fixed. I think it's not the web app's job to handle closing notifications, so I don't see the reason to make it a toggle -- we can just remove that altogether
Author

I think it's not the web app's job to handle closing notifications

Yep, I agree completely.

there's a good chance this apparent issue in chrome is fixed

MDN indicates that this has indeed been fixed.

Old versions of Chrome didn't remove notifications automatically so you can do so after a setTimeout() only for those legacy versions in order to not remove notifications from notification trays on other browsers.
https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API#closing_notifications

> I think it's not the web app's job to handle closing notifications Yep, I agree completely. > there's a good chance this apparent issue in chrome is fixed MDN indicates that this has indeed been fixed. > Old versions of Chrome didn't remove notifications automatically so you can do so after a `setTimeout()` only for those legacy versions in order to not remove notifications from notification trays on other browsers. > https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API#closing_notifications
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma-fe#11
No description provided.