Bug 450674

Summary: It's too easy to accidentally delete virtual desktops
Product: [Plasma] kwin Reporter: Michael D <nortexoid>
Component: effects-overviewAssignee: KWin default assignee <kwin-bugs-null>
Status: ASSIGNED ---    
Severity: normal CC: 677ee1vp, aeon.descriptor, aoeui, darhma, denilsonsa, dev.bacteriostat, dmatteo002, nate, n_s_mendoza, postix
Priority: NOR Keywords: usability
Version First Reported In: 5.24.1   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot of the "Trash" button when the user has vertical screens
attachment-4083161-0.html

Description Michael D 2022-02-21 22:37:05 UTC
The button that appears on hover to delete a virtual desktop can be very easily pressed by accident. The thumbnails are very small so the proportion of the button size to the thumbnail appears to be around 1/12--i.e. the delete button takes up around 1/12 of the thumbnail. There is also no "undo" function if one accidentally clicks the delete button. You can add another virtual desktop again, but overview does not allow you rearrange desktops the way you had them.

I would prefer removing the button and using a middle click to delete, or else a right click plus context menu, or else drag to trash bin.
Comment 1 Nate Graham 2022-02-22 03:23:10 UTC
Is the problem that you're accidentally deleting desktops? How about an Undo that appears after you delete a desktop?
Comment 2 Michael D 2022-02-22 06:26:22 UTC
Yes that is the problem. Another problem is that I'm always worried about it even if it doesn't happen. An undo would help undo the mistake but it would not prevent the mistake in the first place which is what we should be trying to avoid.
Comment 3 Nate Graham 2022-02-22 17:29:29 UTC
Thanks, re-titling to reflect the problem instead of one possible solution for it.
Comment 4 Nate Graham 2022-02-22 17:30:36 UTC
Maybe we could make the Delete button only appear when the cursor has been hovering over the thumbnail for a second or something. That way a quick click would never show the button at all, so you would never have to fear accidentally deleting the desktop.
Comment 5 Michael D 2022-02-23 08:05:18 UTC
Sounds like a very good solution to me.
Comment 6 Michael D 2022-03-05 08:25:09 UTC
By the way, there is a related issue I have with the delete button. You can drag a window over it and the tooltip "Delete virtual desktop" shows up, which suggests to the user that the desktop will be deleted if the window is dropped onto the trash icon. The trash icon should not show on hover when dragging a window to a desktop thumbnail.
Comment 7 Nate Graham 2022-05-03 17:11:53 UTC
*** Bug 453184 has been marked as a duplicate of this bug. ***
Comment 8 Brian 2022-05-28 16:55:23 UTC
Came here for this -- it would be nice to have an option to disable creation/deletion of virtual desktops altogether.  I have a known and liked virtual desktop configuration that I don't want altered.
Comment 9 darhma 2022-11-07 08:40:56 UTC
(In reply to Brian from comment #8)
> Came here for this -- it would be nice to have an option to disable
> creation/deletion of virtual desktops altogether.  I have a known and liked
> virtual desktop configuration that I don't want altered.

I agree, I happened to accidentally delete a desktop last night and once I added it again I had to reconfigure all the window rules.
Comment 10 Denilson F. de Sá 2023-12-27 01:48:59 UTC
Created attachment 164460 [details]
Screenshot of the "Trash" button when the user has vertical screens

The "trash" button is surprising. The UI shows "look at this rectangle, you can click on me!". Then when the user clicks on it, "Surprise! There was an invisible button that showed up as you moved the mouse cursor, and now your virtual desktop is gone!". Hidden buttons are just bad UX.

This effect is even worse if the user has a 16:9 vertical screen. (i.e. If the monitor is rotated 90°.) Take a look at the attached screenshot, the invisible button takes up about 40% of the area. That's a very large danger zone. So large that I'm always scared to click on it.

It is so annoying that this person came up with his own "solution" (that gets overwritten on each update): https://romangeber.com/blog/tech/kde-plasma-desktop-delete-button-fix

———

As alternatives, I would suggest having a drag-and-drop feature, so that we can easily reorder the virtual desktops, and so that dragging to a trash area would delete the virtual desktop. (And dragging from the "plus" area would create a new virtual desktop.)

I can understand implementing drag-and-drop can be complicated, so I'm proposing an alternative behavior that is easier to implement: If the user deletes the label (i.e. clicks on the label and deletes the text), then the virtual desktop is deleted. In other words, an empty label would trigger a deletion. This sounds intuitive-ish, as the user is already deleting something; while also being very hard to trigger by accident.

Whatever the solution, please get rid of that trash button.
Comment 11 Brian 2024-01-02 00:59:27 UTC
Created attachment 164607 [details]
attachment-4083161-0.html

What about a gear icon that takes you to the settings to add/delete virtual
desktops?  Deleting the label is pretty unintuitive.  In any case, still
strongly agree that the trash icon is rough.

On Tue, Dec 26, 2023 at 8:49 PM Denilson F. de Sá <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=450674
>
> Denilson F. de Sá <denilsonsa@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |denilsonsa@gmail.com
>
> --- Comment #10 from Denilson F. de Sá <denilsonsa@gmail.com> ---
> Created attachment 164460 [details]
>   --> https://bugs.kde.org/attachment.cgi?id=164460&action=edit
> Screenshot of the "Trash" button when the user has vertical screens
>
> The "trash" button is surprising. The UI shows "look at this rectangle,
> you can
> click on me!". Then when the user clicks on it, "Surprise! There was an
> invisible button that showed up as you moved the mouse cursor, and now your
> virtual desktop is gone!". Hidden buttons are just bad UX.
>
> This effect is even worse if the user has a 16:9 vertical screen. (i.e. If
> the
> monitor is rotated 90°.) Take a look at the attached screenshot, the
> invisible
> button takes up about 40% of the area. That's a very large danger zone. So
> large that I'm always scared to click on it.
>
> It is so annoying that this person came up with his own "solution" (that
> gets
> overwritten on each update):
> https://romangeber.com/blog/tech/kde-plasma-desktop-delete-button-fix
>
> ———
>
> As alternatives, I would suggest having a drag-and-drop feature, so that
> we can
> easily reorder the virtual desktops, and so that dragging to a trash area
> would
> delete the virtual desktop. (And dragging from the "plus" area would
> create a
> new virtual desktop.)
>
> I can understand implementing drag-and-drop can be complicated, so I'm
> proposing an alternative behavior that is easier to implement: If the user
> deletes the label (i.e. clicks on the label and deletes the text), then the
> virtual desktop is deleted. In other words, an empty label would trigger a
> deletion. This sounds intuitive-ish, as the user is already deleting
> something;
> while also being very hard to trigger by accident.
>
> Whatever the solution, please get rid of that trash button.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 12 Denilson F. de Sá 2024-01-02 01:24:46 UTC
> What about a gear icon that takes you to the settings to add/delete virtual desktops?

That works for me. But people used to quickly creating and deleting virtual desktops will complain that such button will require too many clicks for something that used to be a single click.
Comment 13 Denilson F. de Sá 2025-02-04 09:42:50 UTC
It is worth noting this can also be a problem for users who have a touch screen. Because touches happen without having a "over" action, people can touch on the invisible button and be surprised. This is another reason why invisible buttons are bad UI. (Even though they are quite common nowadays on many projects.)
Comment 14 Bug Janitor Service 2025-02-13 00:53:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7137