SUMMARY For applets which have a set 'preferredRepresentation' property in main.qml do not expand on click in the system tray. Contrasting to the behavior, they expand when outside the tray or the property is undefined. STEPS TO REPRODUCE 1. Create a test applet. 2. In main.qml make sure to use preferredRepresentation property and set it to compactRepresentation/fullRepresentation. 3. Install and notice that applet refuses to expand only when in system tray. STEPS TO REPRODUCE (Alternative) 1. Copy any applet from /usr/share/plasma/plasmoids/ 2. Paste it in some other folder. 3. Open metadata.json, change id and name. 4. Set preferredRepresentation property in main.qml. 5. Install and notice the applet does not expand in the tray. OBSERVED RESULT Applet does not expand in the system tray. EXPECTED RESULT Applet should expand irrespective of this property. SOFTWARE/OS VERSIONS Linux: Arch Linux 6.8.1-arch1-1 (64-bit) KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2
If you can still reproduce this in Plasma 6.1.4, can you attach your test widget? System-default widgets don't exhibit this, so I suspect the code is slightly wrong in some subtle way, but let's find out.
Specifically, what are you setting the preferredRepresentation property to? I suspect the `compactRepresentation` value indeed it simply incompatible with being in the system tray's expanded view.
(In reply to Nate Graham) > System-default widgets don't exhibit this To test this, I went ahead and added the preferredRepresentation value to the org.kde.plasma.battery applet. The issue is definitely reproducible. > Specifically, what are you setting the preferredRepresentation property to? Setting it to either value breaks this functionality. Users of my applet were reporting this but it was not reproducible for me. Maybe it had to do something with the KF5 stuff that I had installed. After a reinstall of Arch, the issue persisted for me as well.
Ultimately I think this is a case of developer/user error. The purpose of this property is to force the applet to always show a particular representation. In the System Tray this only makes sense for applets implemented as a simple on/off toggle for something, with no expanded view, such as Input Method or Keyboard Layout. For something like Battery Monitor, it doesn't make sense.