nextcloud / spreed

🗨️ Nextcloud Talk – chat, video & audio calls for Nextcloud
https://nextcloud.com/talk
GNU Affero General Public License v3.0
1.64k stars 437 forks source link

Prevent people from accidently deleting a message #5300

Open schiessle opened 3 years ago

schiessle commented 3 years ago

I just tested the new "delete messages" feature and it works really nice. Also quotations update in (nearly) real-time... Really nice!

I just wonder how long it takes until someone deletes an important message by accident. Maybe it makes sense to add a simple undo function in the future?

My initial idea: Don't send the delete request to the server directly. Instead first replace the chat message with something like:

Message will be deleted in 5 seconds [undo]

The 5 seconds count down 5,4,3,2,1,0 and than the delete request is send to the server and the operation is finished. If the user clicks on "undo" before, the operation gets intercepted, nothing was send to the server and the original chat messages appears again.

nickvergessen commented 3 years ago

The delete option should also be red like in the conversation list.

Opposed to the undo we could also do a confirm like on conversation deletion, so its not a mixed list of patterns

nickvergessen commented 3 years ago

@ma12-co opinion on confirm/undo?

PVince81 commented 3 years ago

we've already improved the thing a bit: the delete action will always be in a three dots menu so you have to explicitly open the menu. an accidental click while aiming for "reply" won't happen.

and inside the menu there are extra separators now to make sure you don't accidentally click on delete while aiming for another item: image

marcoambrosini commented 3 years ago

@nickvergessen I think that making the deletion a 3 click operation wouldn't be ideal

The delete option should also be red like in the conversation list.

Agree with this.

@schiessle don't you think that what Vncent said plus the action being red would be enough?

PVince81 commented 3 years ago

this is now the current state on master:

image

seems the red color only appears when hovering the icon, not the entry, and looks a bit washed out so maybe we need at least to tweak that bit