! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[RFE] Adding support for persistent notifications
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-notifyd
Component:
general

Comments

Description Panu Matilainen 2011-03-23 18:47:40 CET
Opening an RFE for persistent notification support as per this discussion on xfce users list: http://foo-projects.org/pipermail/xfce/2011-March/028470.html

Some background pointers to what and why Gnome is doing this + the updated notification spec:
1. http://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html
2. http://blogs.gnome.org/marina/2011/01/07/notifications-with-character/
3. http://live.gnome.org/GnomeShell/Design#Notifications_and_messaging_tray

Basically the idea is piling up any non-transient notifications (which were not immediately acted upon) into a queue which can be accessed later when convenient to the user. Which would probably mean popping up an icon in the systray when there are active persistent notifications, with ability to act on the notifications or clear the queue by clicking on the icon. This is roughly what Gnome's notification-daemon does.

The spec is (IMO) a bit unclear about the expected server behavior though. There are two new notification hints: "transient" and "resident", and for those the behavior is fairly obvious - transient notifications are not kept around, resident notifications are. What to do with notifications which have neither optional hint though is not that obvious... my interpretation of the spec is that such notifications should be kept around if server advertises persistence, and this is what Gnome's notification-daemon seems to do. Also based on the blog comments [2] it's not entirely clear whether "resident" is simply the opposite of "transient" or whether it carries some other expectations too (see the comments about "rich controls" in eg Rhythmbox)

The persistent notifications are supposed to be part of the Gnome 3 theme of "not distracting the user from his/her tasks." There is probably a point to that, but I'm not very convinced about the implementation I see there. In fact while thinking about this, I came up with more or less the same idea as the "quiet" mode in bug 5806 which I only noticed today: if I want to minimize distractions, I switch my mobile phone to silent mode, and if somebody tried to contact me in the meanwhile I can check them out when I'm finished. The "Gnome way" of doing this is analogue to keeping sound enabled in the mobile but just not answering it (and if it rings/beeps a lot, getting more and more irritated and distracted in the process).

Of course the fire alarm notifications like "battery will be drained in 1 minute" need to come through even in a "quiet mode", and quite possible there are some other considerations too. But overall the "quiet mode" would seem like a winner to me, especially given the (Gnome-side) motivation behind the notification persistence feature.

Thoughts? From what I poked around, the technical side of this should be fairly straightforward to implement (and I'm still willing to work on this), it's the UI that's much more interesting...
Comment 1 Jérôme Guelfucci editbugs 2011-03-30 18:06:59 CEST
I like the idea of implementing this as a quiet mode. This mode could be activated when:

1) It is turned on by the user
2) When a full screen application such as a game or a video player is running (notifications are "lost" in that case)
3) Computer is idle

Re the UI, I think we could do something neat and clean with a panel plugin.

Just throwing an idea:

t would show the icon of the application which requested the notification with a visual indication of the number of stacked notifications if > 1. If there is not enough room, icons would be accessible in a menu displayed when clicking an arrow next to the other icons.

For important notifications which could not be passed to the user (full screen or idle) we could add an exclamation mark emblem or something like that.

I'm going to ask for some feedback to some UI-savvy people.

Re the technical side, I agree that this should not be too difficult once we figured out what we want.

Thanks again for your interest, I'm looking forward to seeing this working!
Comment 2 Raphael Groner 2013-05-07 15:00:17 CEST
Could there be a fixed area to put all the notifications in? Some of those notifications are only annoying.
What about an ignore feature for some of the notifications? Maybe by a pattern or only dedicated visuals allowed.
Comment 3 Simon Steinbeiss editbugs 2016-10-22 11:39:26 CEST
As a first step towards the requested persistence feature I've done a (still work in progress) implementation of a notification log, which you can enable/disable with or without the "Do not disturb" mode that I have already merged to master.

I'm not 100% sure regarding the implementation and what is the best default setting.
E.g. currently the user can decide to block certain apps from showing notifications, but all notifications will go to the log (including e.g. audio volume changes).

What I could easily do (and will do) is only log messages marked as "persistent" or "urgent", but the question is how to best expose all of this in the UI.

Also, there is no panel plugin currently, as I'm not sure what the best way of realizing that would be.

Anyway, here's the branch: https://git.xfce.org/users/ochosi/xfce4-notifyd/log/?h=logging
Comment 4 Daniel Eriksson 2016-10-23 17:15:56 CEST
That sounds great!

For my user-case, I would use the persistant notifications to keep track of email, messages, pakage updates, etc. So if I leave my computer a few hours while it works on something or I play a game in fullscreen for a while and go back to my desktop, I want to be able to see what I have missed in a list of some sort.

So I would guess something like that should be the default behavior. I see no direct reason to log volume or brightness changes, but if I understand right only logging "persistent" or "urgent" will take care of that. As for blocked apps, I would probably not want them to show up anywhere.

Finally, I realize a plugin is a bigger thing and with more to take into consideration. In it's simplest form though I'd say it would be like this : http://www.makeuseof.com/tag/review-notifications-ubuntu-desktop-linux/

Even better if the program icon could show up next to the notification, just as it does when displayed by notifyd now, but in a scrollable list. Personally, I see no reason to remove them one at a time. A "Clear All" button would suffice. Again, I could add some money for this.
Comment 5 Simon Steinbeiss editbugs 2016-10-23 21:00:12 CEST
(In reply to Daniel Eriksson from comment #4)
> That sounds great!
> 
> For my user-case, I would use the persistant notifications to keep track of
> email, messages, pakage updates, etc. So if I leave my computer a few hours
> while it works on something or I play a game in fullscreen for a while and
> go back to my desktop, I want to be able to see what I have missed in a list
> of some sort.

You can already see that list in the "Log" tab of the notifyd settings application (in the branch I linked to before).
However, please note that xfce4-notifyd cannot know when you're away and when you're watching the screen, so the log can either be on or off. It's up to you to decide when you want the log enabled or disabled.
At least for the moment I have no good idea as to how to implement an "away" status meaningfully without having yet another separate timer running - and be sure that any implementation of this feature would suffer of bugs and shortcomings (note: there is not even a single screensaver standard in the X11 world).

> So I would guess something like that should be the default behavior. I see
> no direct reason to log volume or brightness changes, but if I understand
> right only logging "persistent" or "urgent" will take care of that. As for
> blocked apps, I would probably not want them to show up anywhere.

It's up to the applications whether they make use of the "transient" notification hint that the standard describes (and which bypasses the persistence feature of the server). Currently brightness or volume notifications don't make use of this hint.

> Finally, I realize a plugin is a bigger thing and with more to take into
> consideration. In it's simplest form though I'd say it would be like this :
> http://www.makeuseof.com/tag/review-notifications-ubuntu-desktop-linux/

Yes, a plugin would go into a separate bugreport/feature-request.

> Even better if the program icon could show up next to the notification, just
> as it does when displayed by notifyd now, but in a scrollable list.
> Personally, I see no reason to remove them one at a time. A "Clear All"
> button would suffice. Again, I could add some money for this.

If you had tested the branch, you'd have seen that this is what I have implemented ;)
Comment 6 Daniel Eriksson 2016-10-23 23:15:37 CEST
Away-status is not necessary, if it's possible to see this list in a GUI as it is, that'll do fine! I thought it was saved internally or to a text file somewhere. A log-tab sounds perfect! I'll just add a shortcut to the settings app on my panel. :)

Sorry for not trying it yet, my system is in a bit of disarray and I'm about to install a fresh Xubuntu any day now. Will try it then! ;)

I'd say this is solved now! Thanks a log! :D

I'll mark it as such on bountysource too.
Comment 7 Simon Steinbeiss editbugs 2016-10-23 23:20:51 CEST
(In reply to Daniel Eriksson from comment #6)
> I'd say this is solved now! Thanks a log! :D
> 
> I'll mark it as such on bountysource too.

Hey no rush, it's not yet merged to master, it still needs more testing and polishing.
(Also, closing it here should mean it'll be closed on bountysource.)
Comment 8 Simon Steinbeiss editbugs 2017-01-30 08:00:28 CET
So it took quite a bit more time for the polishing, but the logging feature has finally been merged to master and will be released as soon as the translations for all the string changes have flown in.

See commits https://git.xfce.org/apps/xfce4-notifyd/commit/?id=71ba7c3fa219eeb7595aa176dd1916533871c757 through https://git.xfce.org/apps/xfce4-notifyd/commit/?id=e542ac4373a9e57b1466013ac9783c4442a245ad
Comment 9 Daniel Eriksson 2017-01-30 14:08:22 CET
Nice! :D Great work!

So, once this is marked as closed you will get your money from bountysource automatically?
Comment 10 Simon Steinbeiss editbugs 2017-01-30 23:55:53 CET
As far as I've seen you have to accept the claim for me to get the bounty.

Bug #7437

Reported by:
Panu Matilainen
Reported on: 2011-03-23
Last modified on: 2017-01-30

People

Assignee:
Jérôme Guelfucci
CC List:
4 users

Version

Version:
unspecified

Attachments

Additional information