[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

Show error messages immediately when loading fails
Closed, ResolvedPublic

Description

There are some error conditions that happen when we're loading the reply widget (e.g. "Could not find the comment…" and "This comment can't be replied to"), but we currently show the error message only after you type in your reply and try posting it, even though we know it will be impossible to save it.

Event Timeline

Change 578387 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] controller: Show error messages immediately when loading fails

https://gerrit.wikimedia.org/r/578387

My original idea for this was to show an error box in the place where we would otherwise show the reply widget:

ErrorNormal reply (for comparison)
image.png (2×3 px, 456 KB)
image.png (2×3 px, 455 KB)

Then we decided to change it to a modal dialog (although I'm not too happy about it):

Error
image.png (2×3 px, 431 KB)

Copying discussion from the patch:

We might just want to show an error dialog, instead of creating a NoReplyWidget. We should discuss.

I don't know if this is the best design, but modal error dialogs surely are worse.

IMO they're the worst possible way to handle errors, you have to move your sight and then your mouse cursor to a completely different place on the screen to deal with them, and they prevent you from e.g. reading other comments on the page until you do. For me they're usually a sign of lazy developers (or too tight deadlines; alert() is the ultimate in quick-and-dirty coding), or coding yourself into a corner with too many abstractions so that you have no way to determine which UI element the error comes from (there are a few exceptions where they make sense, e.g. a confirmation dialog for closing a page initiated by a keyboard shortcut).

Here it seems much better to display the error near the button that caused it, especially if people get used to how the "successful" workflow involved displaying a widget in the same place.

I think some of that applies in general, but in this case the NoReplyWidget still disables all the other reply buttons, so it essentially modal in that you have to find it and click "cancel" before you can continue using the reply tools.

In the cases where the user can possibly interact with the page to fix the error, then the alert doesn't make sense, but here it is very much "You can't complete this action" and the only next step is to take them back to the state they were in before trying.

I talked this over with Jess and she agrees.

Change 578387 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] controller: Show error messages immediately when loading fails

https://gerrit.wikimedia.org/r/578387

@matmarex: could you give me an example of such comment to test?

https://hu.wikipedia.org/wiki/Wikipédia:Kocsmafal_(javaslatok)/Archív130?dtenable=1

(all the comments are wrapped in a template, so they can't be replied to with DiscussionTools)