Bug 471122

Summary: Widget Explorer: Handle/show incompatible widgets in a user-friendly way
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: Widget ExplorerAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: task CC: kde
Priority: NOR Keywords: qt6, usability
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 474456    

Description Nate Graham 2023-06-16 16:25:54 UTC
Because Plasma 5 widgets need to be ported to work with Plasma 6, we need to show incompatible widgets in the WIdget Explorer separately, rather than intermixed, where users will try to use them and they won't work. If we don't do something like this, we'll get a *lot* of bug reports from frustrated users whose widgets don't work and they can't figure out why.

Idea: a separate "Incompatible widgets" section in the grid view where they can live, with a little explanatory text saying that these widgets need to be ported to Plasma 6 before they'll work.
Comment 1 David Redondo 2023-08-24 10:13:41 UTC
How would we detect an unported plasmoid? One idea would to see if the root is PlasmoidItem but that means we need to try loading the file
or do some parsing ourselves until we encounted the root item and see if it is correct.

At least we can change the error message on the desktop if it's not a PlasmoidItem to add a note that it needs porting

https://invent.kde.org/frameworks/plasma-framework/-/blob/master/src/plasmaquick/appletquickitem.cpp#L530
Comment 2 David Redondo 2023-08-24 10:33:42 UTC
Actually for me I the two incompatible plasmoids dont even show in the widget explorer, because they are missing the `    "KPackageStructure": "Plasma/Applet"` key in their metadata.json.

Another issue is plasmoid not using metadata.json but metadata.desktop,   they would also not be listed at all
Comment 3 Bug Janitor Service 2023-11-20 13:19:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3569
Comment 4 Bug Janitor Service 2023-11-20 13:56:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1853
Comment 5 Marco Martin 2023-11-22 08:46:34 UTC
Git commit 9aa3cf5cb7a042fbe8a1ff74ee7d719f8df315c9 by Marco Martin.
Committed on 22/11/2023 at 09:46.
Pushed by mart into branch 'master'.

Unsupported messages in the widget explorer

In the widget explorer model check if the api version is supported,
and if not provide an error message in a role

M  +53   -1    components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
M  +6    -0    components/shellprivate/widgetexplorer/plasmaappletitemmodel_p.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/9aa3cf5cb7a042fbe8a1ff74ee7d719f8df315c9
Comment 6 Marco Martin 2023-11-22 08:46:43 UTC
Git commit 4f412f65f240daf0857539bf62d6b2d69cfbf2ca by Marco Martin.
Committed on 22/11/2023 at 09:46.
Pushed by mart into branch 'master'.

Disable unsupported entries

When the plasmoid is for a different plasma api version, disable it in
the widget explorer, displaying a tooltip message explaining why

M  +13   -1    desktoppackage/contents/explorer/AppletDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/4f412f65f240daf0857539bf62d6b2d69cfbf2ca