What’s up in Notifications?

With the end of the year approaching in some parts of the world and already half a year since I announced the notifications rewrite, I thought I’d give you an update on some of the things I’ve worked on since. While Plasma 5.17 only saw minor changes, most notably automatic do not disturb mode when screens are mirrored during presentations, there are some very exciting new features that will arrive in the upcoming Plasma 5.18 LTS to be released early February next year.

Notification popup with a message from a chat group with text field in the notification popup inviting to "Type a reply..."
Replying to conversations directly from the notification popup

First of all, notification popups now slide out of the way of other Plasma dialogs, such as System Tray, so that when you e.g. connect to a WiFi network a “you need to log in” popup doesn’t get in the way. In 5.17 they just got hidden in this case, which is better than being in the way, but then you might not get to see such prompts until after you closed the popup. Furthermore, handling of 3rd party notification services has been improved: in case you use an alternative service, the Notification widget as well as its settings module will indicate that and disable themselves.

Plasma notification settings with most options disabled and a hint that this is because "Notifications are currently provided by someone other than Plasma"
Notification settings indicating that they can’t do much for you right now

Do not disturb mode can now quickly be enabled or disabled anytime by pressing a configurable global shortcut. Thanks to David Faure, KOrganizer now checks Plasma’s notification inhibition state and delays any reminders until do not disturb is disabled again.

Popup with a crossed out bell, reading "Notifications Off", in response to the user pressing the global shortcut to engage "do not disturb" mode
Feedback that notifications are now off

For added productivity, the progress finished notification gained a little draggable file icon. In case you didn’t know: when you take a screenshot with e.g. Spectacle the preview in the resulting notification can be dragged anywhere you need it: an email composer, a chat application, or a ticket system in your browser. This is one of my favorite Plasma features and is now also available for instance when you have downloaded a file from the Internet.

Speaking of productivity: I finally implemented the inline quick reply field for notification popups. It enables an application to let the user reply to a message directly from the notification without having to open the application first. There is no API in Frameworks to use it yet but it was important to get the Plasma side ready for 5.18 LTS. After that is done I can then look into patching applications: I’ll probably try adding it to KDE Connect first, which basically supports this already using a custom dialog that I assume can be easily ported. Another possible candidate could be Konversation, or pretty much any chat application. :-)

Supporting quick reply is pretty easy for 3rd party applications, too: add an action with ID “inline-reply” and connect to the new NotificationReplied signal on the notification DBus service, which gives you the notification ID as well as the reply text. For compatibility you can either check for the “inline-reply” capability and don’t add the action when not supported or listen to the “inline-reply” action being invoked which a server without this feature would do. There’s also some additional hints that can be set for custom placeholder text and submit button appearance.

Circular progress bar when copying files

Arjen Hiemstra who wrote a brilliant QtQuick-based high-performance chart rendering library KQuickCharts, now part of the KDE Frameworks, added a circular graph for the tray icon when a job is running. This finally restores a feature we lost seven or eight years ago in the initial port of notifications to QML. The countdown bar on the side likewise got replaced by a ring around the close button. Additionally, Marco Martin added some tweaks for Plasma Mobile, such as swiping notifications to dismiss them on touch screens.

Notification from Chromium with the website domain next to the application name
Chromium now indicating the website domain a notification originated in. Also note the new countdown circle.

Finally, I merged a patch for Chromium to make use of our new x-kde-origin-name hint, which indicates the “origin” a notification came from, be it synced from your phone via KDE Connect, a new email in a specific account, or in case of your browser the website that sent it. Aside from that I submitted a patch to have it support the case when a notification service isn’t currently running but could be DBus-activated. Also, I recently fixed Plasma’s audio indicator in Task Manager not working with Chromium anymore. This broke a while ago when the audio streams moved from the browser window process to some tab renderer child process.

I hope you enjoyed what KDE accomplished this year and I’m wishing you and your families all the best, hoping you’ll find some time to relax and visit loved ones, see you again in a few weeks!

KDE logo with Santa Claus hat

4 thoughts on “What’s up in Notifications?”

  1. That was fantastic! Thank you guys for all of your efforts. Happy holidays!

  2. These are great improvements. Congratulations :)

    However, i have a “complete offtopic” i would like to ask:

    Could you provide us with some update about the state of the Global Menu’s HUD mentioned in a previous post from 2018?

    Tks :)

Leave a Reply

Your email address will not be published. Required fields are marked *