Bug 481803

Summary: When the list is empty it displays a small artefact instead of a more verbose feedback
Product: [Plasma] plasmashell Reporter: Emir SARI <emir_sari>
Component: Window List widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: cwo.kde, nate, uhhadd
Priority: NOR Keywords: usability
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In: 6.4.0
Sentry Crash Report:

Description Emir SARI 2024-02-25 07:31:17 UTC
Steps:
- Have no windows open
- Click on the menu

Actual:
- A very small, a couple of pixels wide artefact opens
- There is not enough feedback to the user

Expected:
- Some sort of visual feedback like "No windows open" should be displayed instead when clicked
Comment 1 Bug Janitor Service 2025-02-21 23:03:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2846
Comment 2 cwo 2025-02-24 02:04:01 UTC
Git commit 76561a1e30b379fc49ae820af8a8f66525e83ffc by Christoph Wolk.
Committed on 24/02/2025 at 02:03.
Pushed by cwo into branch 'master'.

applets/window-list: show placeholder when empty

The window list in both forms (panel and desktop) does not handle the
case of having no windows open well; the desktop form is simply empty,
while the panel form has a completely empty menu active.

This change adds a Kirigami.PlaceHolder to the fullRepresentation and
sets a menu containing only a "No open windows" entry that does nothing
for the compactRepresentation. These are modeled on the way that the
task switchers handle this case. Along the way, we rename ids so that
"windowListView" refers to the ListView and not the component that wraps
it, because that is just confusing.

----


| before | after  |
| ------ | ------ |
![windowlist_before](/uploads/3056dff1bcbe2a1dce281a721f255a19/windowlist_before.png)| ![windowlist_after](/uploads/9221f6f0cdb998852e25c45aafd57464/windowlist_after.png)|

(Note that in the before screenshot, while the popup is empty and completely invisible, it's still modal, so the next click anywhere will do nothing except make the popup that's already not there even less there)

M  +22   -4    applets/window-list/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/76561a1e30b379fc49ae820af8a8f66525e83ffc