Page MenuHomePhabricator

It's not possible to undo/rollback edits from diff on Mobile
Open, Stalled, HighPublic

Description

While using "Mobile mode", We cannot undo/rollback bad edits directly from the diff, in order to undo/rollback an edit one first has to click on "Desktop" and then click on "Undo" or "Rollback", this seems like a major hassle for (us) mobile editors.

Undo feature on desktop

https://en.wikipedia.org/wiki/Seminole_Wars?action=history

Screen Shot 2018-04-09 at 8.56.43 AM.png (319×1 px, 116 KB)

Interface on mobile

https://en.m.wikipedia.org/wiki/Special:MobileDiff/835584967

Proposed design

undo thank diff.png (1×750 px, 215 KB)

Developer notes

This is just a matter of this feature never being prioritised and built.
I agree it's a huge hassle for editors who commonly have to undo vandalism. There's an opportunity to make reverting possible on mobile either from the history page.

Note: undo functionality is not currently supported by mobile (it tells you via a popup alert!)
https://en.wikipedia.org/w/index.php?title=Seminole_Wars&action=edit&undoafter=835582676&undo=835584967
although it does seem to be ''possible''.

@Stryn also requested the same feature with this to say:

There should be a way to undo revisions on the mobile version. I'm an admin on one of the Wikipedia projects, and I'm regularly using the mobile version. And when I see vandalism I'm not able to undo it. So I need to change to the desktop version so that I can revert vandalism. IMO It shouldn't be enabled by default, but make it an opt-in feature.

Note

Undo and rollback buttons are currently available in history pages in Advanced Mobile Contributions mode. Only this functionality is missing from the diff page.

Related Objects

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenBUG REPORTNone
OpenNone
StalledNone
OpenFeatureNone
DuplicateNone
ResolvedNone
OpenNone
OpenNone
OpenFeatureNone
OpenNone
ResolvedNone
ResolvedNone
ResolvedHalfak
OpenNone
OpenNone
OpenFeatureNone
StalledNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedPetrb
OpenNone
OpenNone
DeclinedNone
OpenBUG REPORTNone
OpenNone
ResolvedGoalovasileva
StalledNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
ovasileva moved this task from Needs analysis to Blocked on the Readers-Web-Backlog (Design) board.

I have created a JavaScript alternative for this functionality at :en:User:FR30799386/undo

@Force_Radical that's great!
What's stopping us from adding this as an opt in gadget for the mean time?

I second Jdlrobson, I've already installed it and it works great, I've already posted it to the village pump of Wikimedia Commons, I haven't detected any errors while using it, it's just a "rough diamond 💎" (as in it should show when an edit can't be undone or already has been undone, but it's beta software so it's to be expected).

It seems to work very well, just look at these tests:

wp_ss_20181210_0005.png (2×1 px, 245 KB)

wp_ss_20181210_0006.png (2×1 px, 265 KB)

@Force_Radical this is awesome. It looks like there is an updated editUndo icon on OOUI. Although I wonder if the icon adds much in this context? I think it also potentially works well to just have "Undo edit" as the label on the button:

en.m.wikipedia.org_wiki_Special_MobileDiff_772671730(iPhone 6_7_8 Plus).png (2×1 px, 258 KB)

wp_ss_20181210_0006.png (2×1 px, 265 KB)

It seems ok, but where is the Thank button?

@Force_Radical that's great!
What's stopping us from adding this as an opt in gadget for the mean time?

Do we have some list of mobile gadgets in Minerva preferences already?

In T191706#4814498, @alexhollender wrote:

I think it also potentially works well to just have "Undo edit" as the label on the button:

en.m.wikipedia.org_wiki_Special_MobileDiff_772671730(iPhone 6_7_8 Plus).png (2×1 px, 258 KB)

I think the "Undo" should be enough as next to it should be also a thank button.

Let me comment before uploading, there is a thank button just not for your own edits or for edits made by IP addresses as you can't thank yourself or users without accounts. Let me post a screenshot of it below.

Let me comment before uploading, there is a thank button just not for your own edits or for edits made by IP addresses as you can't thank yourself or users without accounts. Let me post a screenshot of it below.

I see, I didn't notice it on the screenshot, sorry for me :)

wp_ss_20181210_0003.png (2×1 px, 640 KB)

For example here I am viewing a comment added by Jeff G. which still shows me the traditional thank button, this feature removes nothing... Except for vandalism. 😉

Unrelated, but anyhow I am a fan of the icon being there, it makes it more recognisable and I personally always prefer flair over simplicity, plus in case the word "Undo" is different in different languages the same icon would still be recognisable for (potentially colour blind) people even if they aren't 100% (one-hundred percent) sure what it says in the local language but do know if an edit they are reverting is 100% vandalism. 😜

Do we have some list of mobile gadgets in Minerva preferences already?

Gadgets that only work on mobile are listed under gadgets in desktop Special:Preference. Enwiki already has a mobile-only gadget called "Add map popups to coordinates in the mobile website", so that can be used as a reference.

Do we have some list of mobile gadgets in Minerva preferences already?

Gadgets that only work on mobile are listed under gadgets in desktop Special:Preference. Enwiki already has a mobile-only gadget called "Add map popups to coordinates in the mobile website", so that can be used as a reference.

I would expect mobile gadgets in mobile preferences. Mobile beta features work that way. But this is just a minor issue and off-topic to this Undo button task :)

@Dvorapa good catch, I forgot about the Thank button. Here is an updated design for consideration:

Artboard Copy.png (1×750 px, 198 KB)

Everyone, thanks for the encouragements....

@DonTrung There doesn't seem to be a way to check if a edit can be reverted. Even the desktop interface provides undo links to all edits.....

@alexhollender I got the idea of the icon from the thank button. The problem starts when you have a person with too many rights, that's where the interface starts looking broken....

Capture.JPG (546×308 px, 27 KB)

@Force_Radical, is there a way you could allow the "Undo" button to always appear on the left side of the "Thank" button similar to the image posted by Alexhollender but with the logo's and colour schemes intact? Maybe where these buttons become slightly smaller and always appear above the username of the person who's edits/contributions you're viewing.

Interesting...okay, so something like this might make more sense, however:

  1. in some cases the panel itself will need to be scroll-able (assuming we don't want to make it taller - I imagine this would frustrate people)
  2. in most(?) cases the page itself will also be scroll-able. It does seem like we could remove the Wikipedia page footer from the diff views so at least shorter diffs don't result in a scroll-able page.

undo thank diff.png (1×750 px, 215 KB)

*I'm showing the scroll bars to remind us of what the current result would be

Note making the Thank button less prominent (and moving to the left) would also help by avoiding accidents like in T63737 !

In T191706#4820962, @alexhollender wrote:

Interesting...okay, so something like this might make more sense, however:

  1. in some cases the panel itself will need to be scroll-able (assuming we don't want to make it taller - I imagine this would frustrate people)
  2. in most(?) cases the page itself will also be scroll-able. It does seem like we could remove the Wikipedia page footer from the diff views so at least shorter diffs don't result in a scroll-able page.

undo thank diff.png (1×750 px, 215 KB)

*I'm showing the scroll bars to remind us of what the current result would be

I was expecting the undo button to be below the diff, at the end of it, not inside the footer.

@DonTrung I'll try to implement it......

I don't think scrollable areas are a good idea, as there is allways the possibility of the fat fingered user accidentally scrolling the footer instead of the diff itself

Change 499864 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Remove the SpecialMobile(History|Contributions) page and use the core versions

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

Change 499864 abandoned by Jdlrobson:
Remove the SpecialMobile(Watchlist|History|Contributions) page and use the core versions

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

There is already a script capable of adding an undo button on the mobile interface. I've asked on https://en.wikipedia.org/wiki/WP:VPT#Undo_script to make it a gadget. I've explained all features in detail on VPT. Script URL - https://meta.m.wikimedia.org/wiki/User:FR30799386/undo.js

Alternative: we can import it to [[en:MediaWiki:Mobile.js]] or [[en:Mediawiki:Minerva.js]]

Masumrezarock100 raised the priority of this task from High to Needs Triage.Jul 19 2019, 8:04 AM

I'm thinking in terms of a separate js module on Minerva that would provide the undo functionality on the diff special page ...

I am removing this project tag because undo buttons are currently available in history pages in AMC mode.

Masumrezarock100 renamed this task from It's not possible to undo edits from the revision history or diff in "Mobile" mode to It's not possible to undo edits from diff in "Mobile" mode.Sep 20 2019, 9:18 PM
Masumrezarock100 updated the task description. (Show Details)

I dont think this is blocked on anything. If so, what?

I dont think this is blocked on anything. If so, what?

Not sure if that was directed at me. I've added the latest proposed design to the description. I guess one more thing to consider would be if we want Undo to be the primary action, or if Undo and Thanks should be presented in an equal manner:

image.png (699×849 px, 185 KB)

@alexhollender The button is destructive, and primary or just only destructive. I am fine with either way. The design looks good. But as a mobile user, a lazy one at that, I don't wish to go through a confirmation screen like in the desktop version to undo a diff. Are you planning to make it automatic?

Masumrezarock100 renamed this task from It's not possible to undo edits from diff in "Mobile" mode to It's not possible to undo and rollback edits from diff on Mobile.Nov 6 2019, 5:22 AM
Masumrezarock100 renamed this task from It's not possible to undo and rollback edits from diff on Mobile to It's not possible to undo/rollback edits from diff on Mobile.
Masumrezarock100 updated the task description. (Show Details)

I just realized that Rollback button is missing from the diff page too. @alexhollender I think we could make the Rollback button primary, since it quickly reverts edits. And keep the Undo button secondary.

@alexhollender The button is destructive, and primary or just only destructive. I am fine with either way. The design looks good. But as a mobile user, a lazy one at that, I don't wish to go through a confirmation screen like in the desktop version to undo a diff. Are you planning to make it automatic?

I think a confirmation step is important on mobile for similar reasons that thank is. You can't undo an undo gracefully and it's too easy to accidentally click things.

With regards to this bug I'd recommend waiting to see what happens with T117279.That should help us get these features for free.

@Jdlrobson well I was talking about the edit page (action=undo) after I click "Undo" on desktop. Current undo buttons on history page just throws users to the edit box. Clicking on "Publish page" again isn't really what I would do when reverting vandalism. A confirmation dialog like FR's undo script for JS users would be good IMO.

I created a script to add a rollback link to mobile diff pages. It just uses some API calls to retrieve the details (tokens, last editor etc) and only works if the current user have rollback rights. https://en.wikipedia.org/wiki/User:Masumrezarock100/mobilediffrollback.js

Screenshot_20191109-115207.png (960×480 px, 77 KB)

Samwalton9 added a subscriber: Samwalton9.

The Moderator Tools team is going to investigate this and T117279.

Slide1.png (720×1 px, 191 KB)

ADDING AN UNDO BUTTON THERE WOULD BE VERY USEFUL IN CASES OF VANDALISM.
PLEASE IMPLEMENT THIS FEATURE, I IMPLORE YOU. THANKS.