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