Hi, recently I was fixing two bugs related to SystemTray (in review: https://phabricator.kde.org/D22804, https://phabricator.kde.org/D22767). I noticed that code is highly coupled and "fragile" with some unclear references like: item.parent.parent.attrbute etc. Items are imperatively assigned to different parents depending on the status.
I would like to add one meta-model with all items (both SystemNotifications and plasmoids) plus Delegate Model(s) with groups: * active * passive/hidden * disabled etc and additional sorting: * notification always as first * other rules possible That model will allow: * better separation between data and view, it is additional abstract layer between backend data (SystemNotifications model + plasmoids list) and current view. * ability to filter/sort/group easily - no need for plasmoid.nativeInterface.reorderItemAfter * clear information about the model used in active/hidden containers * easier implementation of new features like ordering, even with drag and drop (https://bugs.kde.org/show_bug.cgi?id=384782) * decoupled code (with further refactoring, preferably not in one step) no direct parent assignment. The biggest disadvantage (?) I see is that it adds some complexity, change is big and will require quite long review process. I predict it will take around 4 weeks + 4 weeks (or more) for reviews/fixes. What do you think? Should I start work or someone else is working on SystemTray? Few words about me: I'm using KDE for almost 20 years. I'm a developer with 10 years of commercial experience, mostly in Java. One commercial project in QML and C++ - Map Downloader on subaru-maps.com. I live in Poland. -- Regards, Konrad Materka
