Notifications, let the redesign begin
So, it seems it's that time of the year again... the plasmoid used in KDE Plasma Desktop to display notifications and the progress of transfer jobs started to really show its age, due to some bad limitations in the old QGraphicsview code to handle complex layouts, so it appeared quite buggy and not so smooth to use. Yes, I'm aware that sometimes it started to dance resizing itself several times in a row, and there wasn't much to be done on that regard... Until now :D
The fact that there is some research/development being made to build a new backend for notifications that will support many new features, more "modern" to be actually useful with the applications that are so heavily "communication" oriented(both desktop clients and web stuff), that became essential part of out workflow.
The story begins more than a year ago: we needed a way to display notifications on Plasma Active, and obviously the desktop applet used back then wasn't enough.
Since we would have to rewrite it in QML anyways, we started it, at the beginning as a thing used only in Plasma Active.
Here below is the status that will be shipped together Plasma Active 3, in about 2 weeks (more on that later ;)
Then, as it became more and more feature complete, it was obvious that it could have replaced the one used in the desktop quite easily.
But wait, we have different input methods so we need two completely different things otherwise one won't be usable on the other platform, right?
Wrong ;) what we need is a different UI, and not even dramatically different: we need it adapted for a different input method and yet still familiar, the actual code difference needs to be very little.
In QML plasmoids, we can specify some files that will be used only in some platforms, so the system will automatically pick the most suited one. Also the basic component used (buttons, scrollbars etc) while having exactly the same API on all platforms, they can have a radically different behavior (or even, a completely different implementation).
Here is the plasmoid that is going to be merged and shipped with our next iteration of the desktop:
While it looks very similar, there are some important differences:
- Different theme/look (that was easy;)
- The desktop version has scrollbars, the touch version works by flicking and has scroll indicators that automatically appear/disappear
- The touch version has way bigger hit targets
- The desktop version has mouse over effects, the touch version doesn't
- The text in the notifications can be selected with the mouse in the desktop version, and there is a right mouse button menu that allows to select/copy to clipboard
- Instead, with an horizontal drag on a notification on the touch version, it will be moved, and if "thrown" outside the window, it will be deleted.
Difference in code? a couple 100-something lines QML files that are chosen either one or the other, that's it.
The desktop version has more or less the same functionality as the old version shipped with 4.9, the changes are mostly about making the ui a bit simpler.
Also, this new notifications plasmoid is all about the user interface. It has been designed to be as easy as possible to change (or add a new one) the underlying notification system, so it will fit pretty well in the new system that is being researched right now.