Discussion:
D17410: Add alternatives button to applet configuration in panel edit mode
Björn Feber
2018-12-07 17:56:34 UTC
Permalink
GB_2 created this revision.
GB_2 added reviewers: Plasma, VDG.
GB_2 added projects: Plasma, VDG.
Herald added a subscriber: plasma-devel.
GB_2 requested review of this revision.

REVISION SUMMARY
There is a configure button and an alternatives button in the context menu of an applet, but there is no alternatives button in the popup/overlay of an applet in the panel edit mode, so this adds that button, to make it more consistent and easier to find.
F6461739: Alternatives Button in Applet Configuration in Panel Edit Mode.png <https://phabricator.kde.org/F6461739>

TEST PLAN
Hover over an applet in the panel edit mode.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17410

AFFECTED FILES
containments/panel/contents/ui/ConfigOverlay.qml

To: GB_2, #plasma, #vdg
Cc: #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ndavis, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
Björn Feber
2018-12-07 18:00:43 UTC
Permalink
GB_2 updated this revision to Diff 47054.
GB_2 added a comment.


Update TODO text.

REPOSITORY
R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D17410?vs=47051&id=47054

REVISION DETAIL
https://phabricator.kde.org/D17410

AFFECTED FILES
containments/panel/contents/ui/ConfigOverlay.qml

To: GB_2, #plasma, #vdg
Cc: #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ndavis, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
Noah Davis
2018-12-08 01:48:20 UTC
Permalink
ndavis added a comment.


I think we should be using a monochrome icon here. An equivalent monochrome icon would be `favorite`, but I don't think "favorite" is a good symbol for "alternatives". Maybe `preferences-other`/`application-menu` (same icon) would be good? It might be outside the scope of this patch anyway since this means the alternatives icon needs to be changed outside the edit mode as well.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17410

To: GB_2, #plasma, #vdg
Cc: ndavis, #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
Nathaniel Graham
2018-12-08 03:31:42 UTC
Permalink
ngraham added a comment.
Post by Noah Davis
I think we should be using a monochrome icon here.
I agree.
Post by Noah Davis
It might be outside the scope of this patch anyway since this means the alternatives icon needs to be changed outside the edit mode as well.
Exactly. For now, let's follow the existing pattern, and make that change in another patch.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17410

To: GB_2, #plasma, #vdg
Cc: ngraham, ndavis, #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
Nathaniel Graham
2018-12-08 03:37:05 UTC
Permalink
ngraham added a comment.


Neat, it seems to generally work well. I notice that when I click the new menu item, it somewhat unexpectedly exits from panel edit mode. I wonder if we could make it not do that, so it would stay in panel edit mode if invoked while in panel edit mode.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17410

To: GB_2, #plasma, #vdg
Cc: ngraham, ndavis, #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
Björn Feber
2018-12-08 17:39:05 UTC
Permalink
GB_2 added a comment.
Post by Nathaniel Graham
Neat, it seems to generally work well. I notice that when I click the new menu item, it somewhat unexpectedly exits from panel edit mode. I wonder if we could make it not do that, so it would stay in panel edit mode if invoked while in panel edit mode.
I can't find where that is implemented and I think it shouldn't be included here, because it exits the panel edit mode when it looses it's focus.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17410

To: GB_2, #plasma, #vdg
Cc: ngraham, ndavis, #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
David Edmundson
2018-12-08 23:02:20 UTC
Permalink
davidedmundson added a comment.


In general +++

We need to fix that TODO. I added some rough notes, give that a go, it'll involve reading the C++ and seeing how that all ties together with the QML.

If you get stuck, comment here.

INLINE COMMENTS
ConfigOverlay.qml:396
+ tooltip.visible = false;
+ currentApplet.applet.action("alternatives").trigger()
+ }
As for your TODO:

See in plasma-frameworks applet_p.cpp around line 189

Good news: The "visible" property of this action indicates if we have alternatives or not.
So in theory we would just need to bind it to the ToolButton's visibility.

Probably also worth taking the text and icon source from there too

Bad news: This property is only updated when it receives the signal:
contextualActionsAboutToShow

so that needs to be called somewhere.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17410

To: GB_2, #plasma, #vdg
Cc: davidedmundson, ngraham, ndavis, #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
Björn Feber
2018-12-08 23:46:10 UTC
Permalink
GB_2 added a comment.


I'm trying to emit the signal contextualActionsAboutToShow in the (QML) onVisualParentChanged function, but it doesn't work...

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17410

To: GB_2, #plasma, #vdg
Cc: davidedmundson, ngraham, ndavis, #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
David Edmundson
2018-12-09 18:38:30 UTC
Permalink
davidedmundson added a comment.
Post by Björn Feber
I'm trying to emit the signal contextualActionsAboutToShow in the (QML) onVisualParentChanged function, but it doesn't work...
Use console.log to check your code is being called at the right time.
Also search for contextualActionsAboutToShow in other code and then you'll have a reference you can copy.

REPOSITORY
R119 Plasma Desktop

REVISION DETAIL
https://phabricator.kde.org/D17410

To: GB_2, #plasma, #vdg
Cc: davidedmundson, ngraham, ndavis, #vdg, plasma-devel, #plasma, alexde, IohannesPetros, trickyricky26, ragreen, Pitel, crozbo, ZrenBot, firef, skadinna, lesliezhai, ali-mohamed, jensreuterberg, aaronhoneycutt, abetts, sebas, apol, mbohlender, mart
Loading...