Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate "Delete file" better from rest of actions #46732

Open
skjnldsv opened this issue Jul 25, 2024 · 18 comments
Open

Separate "Delete file" better from rest of actions #46732

skjnldsv opened this issue Jul 25, 2024 · 18 comments
Assignees

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Jul 25, 2024

From discussion in #32011

EDIT: Proposal by @jancborchardt at #46732 (comment)

@skjnldsv skjnldsv added enhancement 1. to develop Accepted and waiting to be taken care of feature: files labels Jul 25, 2024
@skjnldsv skjnldsv self-assigned this Jul 25, 2024
@BloodyIron
Copy link

This setting should be on by default for every user.

@skjnldsv
Copy link
Member Author

skjnldsv commented Jul 26, 2024

This setting should be on by default for every user.

@jancborchardt @nimishavijay @marcoambrosini thoughts?

Attention: this is different than this #46733

@nimishavijay
Copy link
Member

indeed we can have an option in the settings, I would also suggest a "Don't show this again" checkbox in the confirmation dialog to easily disable it if it gets too repetitive. What do you think? :)

Additionally, we should also address the root cause which is that this is mostly an issue due to misclicks while attempting to download a file. Since downloading a file is a rather common action, it can be moved up and a less used action like "view" or "set reminder" can be above the delete button.

@susnux
Copy link
Contributor

susnux commented Jul 27, 2024

This setting should be on by default for every user.

I personally think this is more annoying than helpful. No file manager does this.
Ans you can always restore from trashbin

@BloodyIron
Copy link

indeed we can have an option in the settings, I would also suggest a "Don't show this again" checkbox in the confirmation dialog to easily disable it if it gets too repetitive. What do you think? :)

Additionally, we should also address the root cause which is that this is mostly an issue due to misclicks while attempting to download a file. Since downloading a file is a rather common action, it can be moved up and a less used action like "view" or "set reminder" can be above the delete button.

IMO "Don't show this again" is reasonable, but only if:

a) It's not easy to click on by mistake
b) you can undo it in user settings
c) the admins have the ability to block this from being disabled (think, company policies)

@BloodyIron
Copy link

This setting should be on by default for every user.

I personally think this is more annoying than helpful. No file manager does this. Ans you can always restore from trashbin

Every modern operating system does this. Windows, Linux, macOS. This is the default behaviour, and expectation any computer user has when dealing with files in folders. And even in areas where there are no folders (S3).

Restoring from trashbin is not an acceptable alternative, and especially not an acceptable default behaviour. Humans make mistakes, that's the point of confirmation dialogues.

@LMRW

This comment was marked as off-topic.

@susnux
Copy link
Contributor

susnux commented Jul 29, 2024

This is incorrect most file managers ask to confirm. Infact, almost all do.

Thats not really true I tested this in the past on multiple devices and mostly all do only ask if you select more than X items.
(just out of curiosity tested it right now on KDE -> No confirmation needed because of trashbin).

Restoring from trashbin is not an acceptable alternative, and especially not an acceptable default behaviour. Humans make mistakes, that's the point of confirmation dialogues.

Well yes and no, UX wise confirmation is most often bad because in most cases the user wants to do something and then is forced to click through dialogs.
But of course humans make mistakes, thats why there should be always a "revert action" (aka restore from trashbin).
(BTW I think this is an interesting topic, if you like search for "undo vs confirm" or similar :) ).

And not all users have the trash can enabled. For external files and folders it's not even always possible to have it enabled.
Having a confirm for users who do not have trash can enabled is ESSENTIAL and having it for all users is sensible.

@LMRW see 3rd comment: This is not about disabled trashbin! If you do not have the trashbin enabled a confirmation dialog will be always show. See also #46733

@BloodyIron
Copy link

This is incorrect most file managers ask to confirm. Infact, almost all do.

Thats not really true I tested this in the past on multiple devices and mostly all do only ask if you select more than X items. (just out of curiosity tested it right now on KDE -> No confirmation needed because of trashbin).

Restoring from trashbin is not an acceptable alternative, and especially not an acceptable default behaviour. Humans make mistakes, that's the point of confirmation dialogues.

Well yes and no, UX wise confirmation is most often bad because in most cases the user wants to do something and then is forced to click through dialogs. But of course humans make mistakes, thats why there should be always a "revert action" (aka restore from trashbin). (BTW I think this is an interesting topic, if you like search for "undo vs confirm" or similar :) ).

And not all users have the trash can enabled. For external files and folders it's not even always possible to have it enabled.
Having a confirm for users who do not have trash can enabled is ESSENTIAL and having it for all users is sensible.

@LMRW see 3rd comment: This is not about disabled trashbin! If you do not have the trashbin enabled a confirmation dialog will be always show. See also #46733

A revert as a default expectation, without a precautionary "are you sure?" dialogue when triggering any webGUI delete is frankly horrible UX designing.

Yes, many users click through dialogues to skip them to get the intent, but not when deleting files. It is a completely reasonable expectation that if someone clicks "download" but... oops clicks "delete" instead... and then they get an "Are you sure?" type prompt, they are very probably going to stop and read it. Because this completely breaks the expectations of the user.

When downloading a file, it is NOT commonplace to have an "are you sure?" confirmation prompt. So a user being presented this would be jarred out of their common workflow and realise "oh wait I probably didn't do what I think I did" and NOT click through the dialogue.

As has been pointed out there are MANY good reasons why reverting from trashbin should not be the default behaviour. 1) Because it is in many cases not an available option, 2) because it is bad UX design, and 3) because it also takes a lot more time than just an "Are you sure?" dialogue.

The minor inconvenience of this dialogue does not outweigh the extremely tangible and proven value of having the "are you sure?" dialogue in every single delete file webGUI function, regardless of pull-down menu or otherwise.

====

Additionally, your cherry-picked sample-size-of-one example of KDE somehow not having an "Are you sure?" dialogue in deleting a file is the exception not the norm.

@skjnldsv
Copy link
Member Author

skjnldsv commented Jul 30, 2024

As a reference:

  • ondedrive always asks
  • google do not always ask

I think, seeing the consensus, we should always ask too

@BloodyIron
Copy link

Windows file management always asks.

Gnome Nautilus always asks.

Pepperidge Farm always asks.

@susnux
Copy link
Contributor

susnux commented Jul 30, 2024

Windows file management always asks.

Tested on Windows 11: Does not ask. You have to enable this option manually by default Windows does not ask.

@susnux
Copy link
Contributor

susnux commented Jul 30, 2024

As has been pointed out there are MANY good reasons why reverting from trashbin should not be the default behaviour.

  1. Because it is in many cases not an available option

As pointed out we always ask when the trashbin is not available -> so this is not applicable here.

  1. because it is bad UX design

I think this really depends, as said search the web for "undo vs confirm" and you will see a lot of UX design patterns recommend using an "undo" as it does not block the flow.

  1. because it also takes a lot more time than just an "Are you sure?" dialogue.

Yes, but for 1 time of accidentally removing (and going through the trashbin) comes X times where you have to confirm something you already wanted to do. I did not do any research study on this but I would guess you much more often delete on purpose than accidentally.


But as already mentioned above it is up for the @nextcloud/designers to decide which is the best way for UX :)

@skjnldsv
Copy link
Member Author

Yes, I think we have all the data on hand now. Thanks for everyone involved.
We'll let product management decide, no need for further argumentation 🙏

@jancborchardt
Copy link
Member

So, as per #43231 (thanks @skjnldsv!) we already ask when deleting 5 items or more. Great!

Now the original issue from #32011 is:

When we right-click on the files we have the last two options from the "Download" and "Delete" list. It is very common for our users to click "Delete" instead of "Download" and the files are deleted directly.

And I agree – these actions are too close to each other, and "Delete" looks too normal. This is how it can be instead, and if that’s fixed I would consider this issue closed. We are not going to add an option for a miniscule thing such as this, as it should simply work – and as said we are walking a nice middle ground between established solutions here.

  • Add a divider above "Delete file" (also "Unshare from me" etc)
  • Color the action red / --color-error
Current actions Improved actions
image image

Yes, many users click through dialogues to skip them to get the intent, but not when deleting files. It is a completely reasonable expectation that if someone clicks "download" but... oops clicks "delete" instead... and then they get an "Are you sure?" type prompt, they are very probably going to stop and read it. Because this completely breaks the expectations of the user.

@BloodyIron this is actually exactly the case where people would click the button to make the popup go away, thinking "I just clicked download, let me get to what I want". So as usual, a modal would not improve the situation here.


A nice additional fix would be to implement undo: #3216

@jancborchardt jancborchardt changed the title Add an option to always ask before deletion Separate "Delete file" better from rest of actions Sep 11, 2024
@jancborchardt
Copy link
Member

Referencing how it’s done in Talk exactly the same way. FYI @marcoambrosini probably something to permanently embed as example in the Vue component docs?
image

susnux added a commit to nextcloud-libraries/nextcloud-files that referenced this issue Sep 11, 2024
Makes the action be shown more prominently marked as destructive.
Required for nextcloud/server#46732

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@skjnldsv skjnldsv assigned susnux and unassigned skjnldsv Sep 11, 2024
@BloodyIron
Copy link

BloodyIron commented Sep 11, 2024

I completely disagree that the expectation of hitting a Download button could produce an "ARE YOU SURE?" Yes/No with big scary redness on it. I have never, ever, seen a download function (button or link) come up with a confirmation dialogue on any website, tool, or piece of software. It either starts the download immediately, prepares the content for downloading (like zipping) and then starts downloading, or in the example of Ubuntu takes you to the page that triggers the download and has other content.

When someone would click on Delete by mistake, and get prompted with an "ARE YOU SURE?" Yes/No dialogue, that is so distinctly unexpected that it would reasonably jar the user back to considering "did I do what I actually thought I did?".

I again advocate that the "ARE YOU SURE?" dialogue be a minimum for every single kind of delete via webGUI, regardless of whether other aspects are added to (such as presentation adjustments with a gap, trash bin recovery, whatever).

If someone were to STILL click Yes through an "ARE YOU SURE?" dialogue after thinking they clicked Download, then that should be on the onus of the user.

Seriously, I have yet to see a single example, ever, in my entire lifespan, where confirmation of download was the next step in the workflow.

But to flip this on its head THERE IS NO DOWNSIDE TO ADDING THE CONFIRMATION DIALOGUE TO AN IMMEDIATELY DESTRUCTIVE TASK.

Again, this is DELETING content, one of the very reasonable times to have an "ARE YOU SURE?" Yes/No confirmation dialogue, and we're finding reasons for that confirmation dialogue to NOT EXIST? That is frankly absurd and outright garbage decision making. The files people keep in nextCloud are the files they care about, and making it EASIER to accidentally delete them by not having this confirmation works against the very nature of the Files aspect of nextCloud.

I do agree that spacing the Delete link away from the Download link is sensible, but IT SHOULD NOT BE A REPLACEMENT FOR A CONFIRMATION DIALOGUE.

I am appalled that there is this much push back on adding a confirmation dialogue here. Please JUST ADD IT. Not having it is actually a very real world and tangible problem that happens all the time.

Also removing a user from a room IS NOT the same thing as deleting a file.

@susnux
Copy link
Contributor

susnux commented Sep 11, 2024

Again, this is DELETING content

No it is not, it is removing -> The user can undo it by moving it out of the trash bin again.
If the trash bin is disabled, then there is a warning dialog because then it is deleting.


Please feel free to open a feature request about always adding that dialog.

We watch very closely what are the community demands and try to implement and align with the most requested things (we use the common Github rating using 👍 reactions on the feature requests).
For now we will make it visually more separated as shown in the mockup, as we think this is the best default behavior for the majority of our community.

@skjnldsv skjnldsv added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗️ At engineering
Development

No branches or pull requests

6 participants