Bug 481803 - When the list is empty it displays a small artefact instead of a more verbose feedback
Summary: When the list is empty it displays a small artefact instead of a more verbose...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Window List widget (show other bugs)
Version: master
Platform: Other Other
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-02-25 07:31 UTC by Emir SARI
Modified: 2025-03-14 20:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.4.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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