Prevent people from accidently deleting a message
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.2k
- Forks
- 587
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 333
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the chat message deletion UI and the delete request path described in the issue body. Verify how deletion and message restoration currently work, then implement the five-second countdown with an undo action; done means the server request is delayed, undo prevents it, and the original message returns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100