Page MenuHomePhabricator

As a curating editor I want to be able to undo a revision
Open, MediumPublic

Description

Why are we doing this?

The ability to undo an edit is helpful for quickly reverting vandalism. As this powerful tool is available to all users, without needing to be confirmed, we would like to make it available in the app.

User story

As a reader/editor using the Wikipedia iOS app, I want to be able to revert vandalism quickly when I see it by undoing a revision

Mocks

RevisionUser educationUndo revision logged inUndo revision logged outPotential for conflict warningEdit summaryEmpty edit summaryEdit summary, keyboard upEdit confirmationUndo revision not possibleCancel out of modal
400 - History - Undo revision.png (750×1,334 px, 149 KB)
400 - History - Undo Revision - user education panel.png (750×1,334 px, 167 KB)
402 - undo revison - Preview.png (750×1,334 px, 281 KB)
401 - undo revision - logged out.png (750×1,334 px, 264 KB)
403 - undo revison - potential for conflict.png (750×1,334 px, 129 KB)
403 - undo revison - edit summary.png (750×1,334 px, 106 KB)
404 - undo revison - edit summary - empty edit summary.png (750×1,334 px, 130 KB)
405 - undo revison - edit summary keyboard up.png (750×1,334 px, 116 KB)
406 - reverted edit confirmation.png (750×1,334 px, 142 KB)
401a - History - Undo revision - not possible- tapped.png (750×1,334 px, 176 KB)
402a - History - Undo revision - not possible.png (750×1,334 px, 163 KB)
https://zpl.io/V0wXMxRhttps://zpl.io/awgG00Nhttps://zpl.io/aBWLRBQhttps://zpl.io/2jYD5Q4https://zpl.io/bzjpYJ7https://zpl.io/awO8J47https://zpl.io/VDWeYwrhttps://zpl.io/VDWeY9qhttps://zpl.io/VKyrY88https://zpl.io/bAWL7lnhttps://zpl.io/V4zLe5N

Design details

  • Logged in and logged out users can undo changes, but we should show an alert when users are not logged in
  • Edit summary should include the pre-canned option of 'reverted vandalism'
  • If an edit cannot be undone -- after submitted, we should show a user education modal explaining that the user must make changes manually with an included link to the editing view open to the section in question.
  • If the user taps 'cancel' on the 'cannot undo' education modal, the 'undo' link should now be greyed out

Event Timeline

• JMinor renamed this task from Restore to As a curating editor I want to restore the active version of an article to an earlier revision.Jul 23 2019, 9:21 PM
• JMinor triaged this task as Medium priority.
• cmadeo renamed this task from As a curating editor I want to restore the active version of an article to an earlier revision to As a curating editor I want to be able to undo a revision.Aug 6 2019, 8:13 PM

Change undo link to a revert icon in the toolbar

Can't undo modal feels too heavy

@JMinor @cmadeo

Moving this into blocked until we can discuss. The API (see: undo parameter) we have available to us is a simple undo call that succeeds or fails due to conflicts, there is currently not a way to diff & preview the revision's changes on top of the latest revision before performing the action. We are able to set a summary before it attempts to undo.

We might be able to show a diff by comparing the undo revisionID with it's previous revisionID, but caveat that diff might not be accurate - it will not reflect any changes made since the undo revision. Another issue is the conflict failure - we won't know if it fails due to conflicts until the undo is attempted, so the user will have to see a (possibly inaccurate) diff, enter the summary and publish before seeing the error popup. Once the undo succeeds, we should be able to fetch the latest article text and show you the result (essentially moving the preview screen until after publish).

Standup recap:

Thoughts are to cut the diff / preview portion out of the undo flow and replace with some informative interim screen to explain what will happen. They will still be able to see and edit a summary/save changes screen and tap publish for any revision. Note we won't know there's an "edit cannot be undone" conflict error until after they tap Publish on the summary screen.