decred / politeiagui

ISC License
62 stars 56 forks source link

Failed comment votes are hard to notice #2898

Open xaur opened 1 year ago

xaur commented 1 year ago

Comment voting works good if the server is healthy, but if it errors on saving comments the user can easily stay unaware of it.

Reproduce:

Result scenario 1: I keep the tab open. After 2 min since the first comment vote the GUI learns that it failed. The UI sometimes scrolls up to start of the comments list and shows an error:

Error: The server encountered an unexpected error, please contact Politeia administrators and inform the api/comments error code:

I say "sometimes" because I don't remember it always happening. I could have interrupted that auto-scroll with my own scrolling.

In the end I'm left with an error but I don't see which of my actions (comment votes) failed and need to be retried later. All failed votes are merged in this one error.

Result scenario 2: I close the tab before the UI knows the votes failed. In this case I will never learn about the failures.

Decision making behind the current implementation is captured in #1792 and #2517.

I suggest to tweak this to prevent the user from being unaware of failed votes. A good starting point may be to reduce the timeout when the vote is considered failed because 2 minutes feels too long. Then maybe add some red exclamation marks near the thumbs up/down icons that would show exactly which actions have failed.