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

Show simple error message on filepage when submit fails
Closed, ResolvedPublic

Description

User story: As a Commons user, when I submit structured data for a file and the process fails, I need to see an informative error message so I can fix the problem.

We have this: When the submit() method of the StatementWidget fails, an error message is posted to the DOM for a split second then is removed before the user can read it and the offending element is removed from the page.

We want this: When submit fails, the offending element should remain in place and an error message should be shown to the user explaining what happened and, if applicable, how they can fix it. For the time being, we can show a standard error message above the Publish button as depicted here:

Screen Shot 2019-09-13 at 4.09.07 PM.png (912×1 px, 134 KB)

Acceptance Criteria:

  • When the API call to Wikibase fails on publish, the user is informed about what happened and what they should do (come back later, contact someone, fix an error, etc.)

During development, please test the following:

  • Test this feature while logged in AND logged out
  • Test this feature on at least one mobile browser
  • Test that this feature works on the file page only

Event Timeline

Here’s a screen recording of this happening to a real user (affected by an IP block due to using a VPN), to give an impression of just how fast the error message vanishes: https://twitter.com/leli_gibts_scho/status/1199843097431171072

Here’s the frame (yes, singular) with the error:

frame52.png (618×974 px, 197 KB)

Notice that the “open proxy” part of the block message would probably be quite useful to the user, so I think it should be part of the message informing the user “about what happened and what they should do”.

Thanks very much for passing this along Lucas!

AnneT removed AnneT as the assignee of this task.Dec 2 2019, 8:59 PM

Once this patch is deployed, submit errors will print to the page. As discussed in our design/dev meeting today, I'll update the UI a bit to follow foundation design standards and unify the error UX across different scenarios in the following ways:

  • Display error at the top of the statement panel
  • Use default OOUI styles
  • Show inline errors for invalid values

Examples, language pending:

publish error.png (844×829 px, 112 KB)

inline qualifier error with statement message.png (657×822 px, 55 KB)

Change 558717 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Show submission errors at the statement panel level

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

Change 558717 abandoned by Anne Tomasevich:
Show submission errors at the statement panel level

Reason:
This super doesn't work

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

Change 559211 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Update error UX on submit

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

Change 559211 merged by Matthias Mullie:
[mediawiki/extensions/WikibaseMediaInfo@master] Update error UX on submit

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

@AnneT Do these screenshots still represent what the patch is supposed to look like in the UI? I tested this on production and errors show but it's not quite the same (for example, qualifier input errors don't have messages that appear above the qualifier itself - they only appear at the top of the statement)

Once this patch is deployed, submit errors will print to the page. As discussed in our design/dev meeting today, I'll update the UI a bit to follow foundation design standards and unify the error UX across different scenarios in the following ways:

  • Display error at the top of the statement panel
  • Use default OOUI styles
  • Show inline errors for invalid values

Examples, language pending:

publish error.png (844×829 px, 112 KB)

inline qualifier error with statement message.png (657×822 px, 55 KB)

Additionally, when I try the original scenario Lukas mentioned above (using a banned proxy/VPN) I don't get the full error message, only this:

image.png (424×891 px, 52 KB)

@Ramsey-WMF To answer your first question, I wasn't able to display the error message directly above the qualifier because the error response we get back:

  1. Doesn't make it clear if the error is directly related to the qualifier or more general (e.g. banned proxy/VPN)
  2. Doesn't make it clear which qualifier is the culprit (in the case of multiple qualifiers)

Because of this, I decided to show all error messages at the statement widget level.

As far as the error message text, I'm not totally sure – it could be related to the changes I made to the StatementWidget UX when an error occurs, or it could be because we're now preferring the no-HTML error info over the detailed error message. @matthiasmullie, what do you think?

Change 579256 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Prefer detailed error message over plain error response

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

As far as the error message text, I'm not totally sure – it could be related to the changes I made to the StatementWidget UX when an error occurs, or it could be because we're now preferring the no-HTML error info over the detailed error message. @matthiasmullie, what do you think?

Looks to be the latter: my changes to prefer the more simple error responses screwed this up - I apparently didn't realize there are cases where it'd drop (significant) information. Have a patch up to restore the old error responses.

Change 579256 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Prefer detailed error message over plain error response

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

The changes that Matthias made to restore the old error responses are up and working and so is everything else in this ticket so I'm going to close it.