Port applets' custom CompactRepresentations to the basic/default one as much as possible
Synopsis
Currently most applets define a custom CompactRepresentation rather than using the basic/default one that lives at https://invent.kde.org/plasma/plasma-desktop/-/blob/master/desktoppackage/contents/applet/DefaultCompactRepresentation.qml. This is because it's very limited, offering only a simple icon that opens the FullRepresentation when clicked.
Some applets have very complex CompactRepresentations, but many do not, only doing one or two things different from what the basic one offers. When such applets define a custom CompactRepresentation that's 99% identical to the basic one, the result is extra boilerplate code that increases bugginess and inconsistency. Let's try to port them the basic CompactRepresentation as much as we can, adding features as needed so that it can serve more use cases.
Applets that can be ported right now because the default CompactRepresentation is fine
- Device Notifier: !3137 (merged)
- Touchpad: plasma-desktop!1637 (merged)
- Kicker (maybe/probably; need to work through the complex
isDash
code and maybe just get rid of all of it)
Applets that can only be ported once the default CompactRepresentation gains features
Not all applets can be ported due to the complexity of their custom CompactRepresentations, but many can. I found 12 that need only minimal functionality added to the default CompactRepresentation before they can be ported. Some features are rather common.
X = can be ported once these features are added
O = still needs custom code for other things, but would benefit from the centralized features anyway
This table is ordered by priority, e.g. which features we should add first that will do the most good:
Feature | Application Menu | Audio | Battery | Bluetooth (DONE) | Brightness | Calendar | Folder | Lock Keys | Kickoff | Networks (DONE) | Sticky Notes | Trash | Web Browser | Weather | Window List |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Optional ability to show text below or beside icon when there's space (e.g. when not in system tray) | O | X | X | X | X | ||||||||||
Optional ability to define a custom drop handler | X | X | X | ||||||||||||
Optional middle-click actions (plasma-desktop!2473 (merged)) | X | O | X (bluedevil!181 (merged)) | O | X (plasma-nm!369 (merged)) | ||||||||||
Optional ability to open FullRepresentation on drag hover (libplasma!1223 (merged) + plasma-desktop!2633 (merged)) | X | X | X (kdeplasma-addons!640 (merged)) | ||||||||||||
Optional ability to show overlay items on top of icon | O | X | X | ||||||||||||
Optional ability to mark icon as disabled | X | X | |||||||||||||
Optional scroll actions | X | O | O | ||||||||||||
Ability to load images, not just icons | X |
Merge requests for features added to the default CompactRepresentation:
- Key handling and accessibility: plasma-desktop!1638 (merged)