codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
394 stars 68 forks source link

Improve feedback when a post is deleted out from under you #1118

Open cellio opened 1 year ago

cellio commented 1 year ago

https://meta.codidact.com/posts/287930

Scenario: you visit a post, then the post is deleted, then you try to interact with it (for example by expanding a comment thread). Currently this silently fails, leaving the user confused.

My proposal is that when we get an error from the server because of a deletion, we provide some sort of feedback -- an in-page notification like the ones you get for some other errors, maybe, or by styling the post with the pink background so you can keep reading the page you were already on until you navigate away or refresh (at which point it's plain old deleted content, nothing special).

There might be better ways to handle this than what I've suggested here. The goal is to provide some feedback about why an operation failed; I'm flexible about specific implementation.