WIP: Implement sidebar mode for system tray plasmoid popups

Authored by filipf on Oct 11 2019, 6:29 PM.


Group Reviewers

System tray popups are currently resizeable through means of an obscure method (ALT + right click + drag) and the resized values are not remembered on plasmashell restart.

This patch attempts to implement a sidebar mode, which is just the popup expanded to maximum available height.

WIP because it doesn't work well for when the panel is on the bottom or right (see vid).

Test Plan

When it works (left and top panel orientation):

When it doesn't work (right and bottom panel orientation):

Diff Detail

R120 Plasma Workspace
systray-sidebar-mode (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 17589
Build 17607: arc lint + arc unit
filipf created this revision.Oct 11 2019, 6:29 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 11 2019, 6:29 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Oct 11 2019, 6:29 PM
filipf edited the test plan for this revision. (Show Details)Oct 11 2019, 6:32 PM
filipf added reviewers: VDG, Plasma.

Interesting, this sorta-kinda implements what's requested in 412483.

filipf updated this revision to Diff 67745.Oct 11 2019, 7:50 PM

Remember if sidebar mode was on when restarting plasmashell

filipf edited the summary of this revision. (Show Details)Oct 11 2019, 7:50 PM
ngraham added inline comments.Oct 11 2019, 8:08 PM

Now that you added a RowLayout, this could go inside it rather than being positioned with anchors

filipf added inline comments.Oct 12 2019, 6:29 PM

It seems to me like this whole file can be rewritten with layouts (as opposed to using anchors). The problem I'm having is that even a minimal touch (putting the heading in the row layout) breaks stuff. So I've set out to just rewrite the whole thing. So far it's not great, but not awful either.

mart requested changes to this revision.Oct 16 2019, 9:10 AM
mart added a subscriber: mart.

This is more a comment on the technical side.
It seems quite a brittle implementation to me, and quite prone to breakage (anything that relies on PlasmaCore.Dialog trying to make with it things that weren't in its architecture is bound to break, and that class in general is not much touchable.
also, assumes that the systray will be positioned in a panelon a screen edge, and since this is not enforced, it should not be assumed.

Anything that wants to do such a sidebar.. that's really a panel (different window flags, different many things, but still is a containment of Plasma::Types::Vertical form factor and Plasma::Types::Right location, withthe plasmoids inside that would react to that concept.

That would be quite an huge things touching pretty much every level down to plasma-framework, but i feel this approach wouldn't really work.

On this systray plasmoid only, I would already prefer trying to give it a resize handle and allow generic vertical resizing (so also allowing to resize it to full height) is still not very robust, but at least kinda makes sense when the systray is not exactly where is expected (if necessary, there is quite some popup resizing code that was deleted still buried somewhere in years old git history)

This revision now requires changes to proceed.Oct 16 2019, 9:10 AM

I agree that it would probably make more sense to allow the system tray popup to be arbitrarily resized, and use a panel instead when you wand a vertical sidebar type of UI. The issues with using a panel to accomplish that are discussed in https://bugs.kde.org/show_bug.cgi?id=412483.

filipf abandoned this revision.Oct 17 2019, 12:00 AM

Yeah, can't get this to work properly anyway.