Page MenuHomePhabricator

Add 'undo' to loading widget and remove prompt
Closed, ResolvedPublic

Description

The following is the outcome of the investigation in T286564#7229226:

The undo panel is in the same place as the loading widget.

  • Remove the current 'are you sure?' prompt;
  • move loading widget to be above the edit box (below the 'Page body' label, if it's shown), so the text box is fully visible;
  • after loading is complete and the text has been replaced, don't remove loading widget but instead change its text to '⎌ Undo transcription';
  • on clicking 'undo', remove the text, have 100ms (or whatever) of blank, then insert the old text (to give a visual indication that something has changed, because the change might be quite small and/or off screen);
  • then leave the undo panel open for a further 700ms or something (because we're not going to offer undoing the undo), and remove it.
  • If 'undo' is not clicked, the widget stays open until the user types something in the text box, or clicks 'transcribe text' again.

This means that the text box will jump down a bit when the 'Transcribe text' button is clicked, so we'll add a 'slide down' to make it a bit less jarring. Only the top would move down, because the text box parent is already a flexbox.

Something like this:

Loading:Undo:
ocr-loading-spinner.png (1,040×266 px, 58 KB)
ocr-loading-undo.png (1,069×320 px, 63 KB)

Visual reference – Updated

Screen Shot 2021-08-02 at 17.28.32.png (1,706×934 px, 436 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 708474 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/Wikisource@master] Add 'undo' banner after fetching OCR text

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

Test wiki created on Patch Demo by Samwilson using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/d7323d2327/w/

The animation looks great, thanks @Samwilson! Following a call with @NRodriguez, it was brought up that it might be good to extend the display of the banner to 30s total so that users with longer text or other types of devices might be able to revert changes with a bit more timeframe. Also ideally we'd want to include the arrow with the button and make it blue in order to emphasize that it's part of the button. Additionally, it'd be great if we could add a "close" icon on the right of the banner so users can dismiss it if they don't need it.
Visual reference below:

Screen Shot 2021-08-02 at 17.28.32.png (1,706×934 px, 436 KB)

Thanks, that's a great idea with the closing 'x'. Adding it now.

Test wiki on Patch Demo by Samwilson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/d7323d2327/w/

Change 708474 merged by jenkins-bot:

[mediawiki/extensions/Wikisource@master] Add 'undo' banner after fetching OCR text

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

Below are some test result per @Djackson-ctr and I testing;

  1. Noticed when you click ‘Transcribe text’ and then move and click my mouse underneath ‘Undo transcription’ it will display a keyboard icon overlapping the drop-down arrow, after about 3 seconds the keyboard icon goes away (see screenshot below):

Screen Shot 2021-08-13 at 7.55.11 PM.png (2,144×1,314 px, 1 MB)

  1. FYI: new code changes on some mobile devices, is missing this is happening with Android phones and Android tablets and also with iPhones (I wasn’t sure if this is by design or if this was omitted from coding) anyway no testing could be performed on those devices:

Apple emulator for iPhone 12 Pro Max with iOS version 14.5-.png (401×862 px, 199 KB)
.
Screenshot taken from Samsung FE20 phone with Android version 11.png (432×842 px, 195 KB)

Test environment: – (ad7f51a) 06:07, 10 August 2021 GPL-2.0-or-later
Compatibility Testing was performed on the following:
Desktop -- Firefox version 91 Windows 10 / Chrome version 92 Windows 10 / Microsoft Edge version 91 Windows 10 / Safari version 14 Mac OS 11 / Internet Explorer version 11 Windows 10 / Opera version 78.04093.112 Windows 10.

Mobile Device -- iOS version 14.5 iPad 5th generation.

pasted image 0 (4).png (1,144×706 px, 378 KB)

pasted image 0 (3).png (1,395×747 px, 484 KB)

pasted image 0 (2).png (537×401 px, 128 KB)

pasted image 0 (1).png (583×845 px, 288 KB)

pasted image 0.png (310×426 px, 90 KB)

Thanks for the screenshots and thorough testing at every screen size @imaigwilo