Page MenuHomePhabricator

Report failed save to users
Closed, ResolvedPublic8 Story Points

Description

Motivation
There is a class of errors that result from the user clicking the save button but the server replies that the save has not happened.

Currently in this event the following happens:

As you can see the user isn't informed what the problem is. They are also not made to leave edit mode (this is probably a good thing or they would be annoyed that their work is lost). This is why we want to give some feedback to users, so they know they should probably click the save button again (which may or may not resolve the issue). Step 1: Generic error message.

Mock
At the top of the page


when scrolled

Acceptance Criteria

  • Whenever the API lets us know a save fails, show the message Your change could not be published. You can try clicking the publish button again. in an overlay to the user as shown in the mock
  • Initially the popup appears on top of the content page (between grey bar and content, if possible, but if not possible, then above the grey bar)
  • Users can scroll content "behind" the popup
  • The error message does not disappear until the error is resolved (successful save, cancel button or leaving the page)

Note

  • The edit fields stay editable
  • In the future we might want to differentiate between errors that might work after trying again. A reasonably comprehensive list we can think of is:
    • API responding with error
    • validation error
    • merge conflicts
    • permission issues, e.g. user banned / wikibase in read only mode
    • storage error
    • no response from the server
      • Dropped network connection between page load and save
      • Very slow / hanging save request
    • Entity changed due to another user editing
    • User edits a language that doesn't exist on Wikibase
    • generic errors
  • Editors would have to try again themselves

The little red octagon with an exclaimation mark seems to be error-error.svg from ooui

Event Timeline

Lea_WMDE created this task.May 9 2019, 1:46 PM
Lea_WMDE triaged this task as Normal priority.May 22 2019, 2:19 PM
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE updated the task description. (Show Details)May 22 2019, 2:27 PM
Lea_WMDE set the point value for this task to 8.
Lea_WMDE updated the task description. (Show Details)May 23 2019, 1:44 PM
Lea_WMDE updated the task description. (Show Details)May 27 2019, 1:34 PM

@Hanna_Petruschat_WMDE How do you feel about the message: Your change could not be published. You can try clicking the publish button again.
Feel free to change however you see fit :) Can you put the ticket to the bottom of ready for pickup once you are happy with the message? Thanks!

@Lea_WMDE I think it is fine. As the error message is that broad and the variations of errors very broad I guess we cannot get any more specific or give further instructions, warnings etc.

Tarrow updated the task description. (Show Details)Jul 22 2019, 9:24 AM
Lea_WMDE updated the task description. (Show Details)Thu, Jul 25, 10:34 AM

Change 528718 had a related patch set uploaded (by Jakob; owner: Jakob):
[wikibase/termbox@master] MessageBanner: adjust styling per updated specs

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

Change 528718 merged by jenkins-bot:
[wikibase/termbox@master] MessageBanner: adjust styling per updated specs

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

Change 529102 had a related patch set uploaded (by Tarrow; owner: Tarrow):
[mediawiki/extensions/Wikibase@master] Update termbox - Show save error message banner

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

Change 529102 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Update termbox - Show save error message banner

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

This is live now. One easy way to get it to show is to go to an entity page and set the network mode to "offline" in the network tab of chrome devtools, and then attempt to save an edit. https://wikidata.beta.wmflabs.org/w/index.php?title=Item:Q11&useformat=mobile

Lea_WMDE closed this task as Resolved.Fri, Aug 9, 6:23 PM
Lea_WMDE claimed this task.

Thanks for the testing description! It looks beautiful :)