Bug 470811

Summary: When right-clicking on a desktop widget that s its own menu, append standard context menu actions in a submenu at the end
Product: [Plasma] plasmashell Reporter: esperluette08
Component: ContainmentAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: nate, notmart
Priority: NOR    
Version First Reported In: 5.27.5   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The single menu appearing when right-click on "Audio Volume" widget

Description esperluette08 2023-06-08 23:06:27 UTC
Created attachment 159550 [details]
The single menu appearing when right-click on "Audio Volume" widget

SUMMARY
When adding the "Audio Volume" widget to the desktop then right-clicking on it, the classical "Configure/Enter Edit Mode/Remove widget" menu is not displayed. Only a menu to select the profiles on audio sources can appear.

So, the only way to remove this widget is to enter in desktop "Edit Mode" (since the widget list from "Add widget..." doesn't allow editing widget already added to desktop), which is more complicated that right-clicking (mostly anywhere) on widget.

STEPS TO REPRODUCE
1. Open Widgets list (from right-click on desktop, then "Add Widgets...")
2. Add an "Audio Volume" widget to desktop
3. Right-click on this "Audio Volume" widget

OBSERVED RESULT
No menu (except one to select the input/output profiles) appears.

EXPECTED RESULT
The "classical" widget menu, with item to delete it, should appear (except where the input/output profiles menu make more sense), allowing to easy delete this widget.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon Live (20230504-0714)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Graphics: X11
Comment 1 Nate Graham 2023-06-09 19:34:10 UTC
Widgets are allowed to override the standard context menu to display context-relevant items. When they do so, they're communicating that the context menu provides relevant actions for the thing being right-clicked on. If we always appended the standard ones, the menu would get really long and the user could accidentally delete their widget while simply interacting with it normally.

I suppose we could shove them in a sub-menu, maybe.
Comment 2 esperluette08 2023-07-03 03:01:49 UTC
I've tested many widgets, for example "Comic Strip" shows many actions when right-clicking on it, including the standard "Configure", "Enter Edit Mode" (and "Show Alternatives" when relevant) and "Remove" at the end, which is consistent with most other widgets.

Maybe theses actions should be automatically appended on each widget right-click menu (if not already present), and if the widget provides an empty menu or no menu (like "Audio Volume" widget when right-clicking outside sliders), the standard "Configure", ("Show Alternatives"), "Enter Edit Mode" and "Remove" should be shown.