Page MenuHomePhabricator

Show error messages immediately when loading fails
Closed, ResolvedPublic


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

matmarex created this task.Mar 12 2020, 4:02 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 12 2020, 4:02 PM

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

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)

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


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

@matmarex: could you give me an example of such comment to test?édia:Kocsmafal_(javaslatok)/Archív130?dtenable=1

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

JTannerWMF moved this task from Inbox to High Priority on the Editing QA board.Mar 24 2020, 9:45 PM
JTannerWMF moved this task from High Priority to Inbox on the Editing QA board.Mar 24 2020, 9:51 PM
Ryasmeen edited projects, added Verified; removed Editing QA.Mar 24 2020, 10:40 PM
ppelberg closed this task as Resolved.Mar 24 2020, 11:55 PM
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 24 2020, 11:55 PM