Page MenuHomePhabricator

It's not possible to undo/rollback edits from diff on Mobile
Open, 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

Interface on mobile

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

Proposed design

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.

Details

Related Gerrit Patches:

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson renamed this task from Cannot undo edits from the revision history in "Mobile" mode to It's not possible to undo edits from the revision history or diff in "Mobile" mode.Apr 9 2018, 4:00 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Jdlrobson.

No @Aklapper this is slightly different and actually I hit the same issue recently :)

Cirdan added a subscriber: Cirdan.Jun 18 2018, 10:20 AM
Cirdan added a comment.Jul 3 2018, 5:06 AM

Half of this is a duplicate of T87609: Feature request: Ability to undo revisions on the mobile version. Perhaps the task should be split into two parts: Reverting revisions from the revision history and reverting revisions from the diff view.

To me, the latter seems to be much more straightforward to implement and less prone to accidental reverts.

To me, the latter seems to be much more straightforward to implement and less prone to accidental reverts.

The problem is the undo feature in the editor is not mobile friendly (due to the two column diffs) and disabled right now.
e.g. https://en.m.wikipedia.org/w/index.php?title=Alabama&action=edit&undoafter=848687111&undo=848688741
That's the main thing that makes this difficult. Once that's fixed it's pretty easy to wire up the rest, so I don't think there's much need to split this right now.

Cirdan added a comment.Jul 5 2018, 5:48 AM

I envisioned a simple "revert this (single) edit" button in the mobile diff view.

This would allow users like me who regularly use waiting time during the day to check their watchlist to revert some of the inevitable vandalism they encounter. Currently, one needs to edit the article and manually revert all changes made. That works OK for punctuation and the like, but gets tedious when whole paragraphs have been removed or altered.

Jdlrobson updated the task description. (Show Details)Sep 24 2018, 8:59 PM
Jdlrobson added a subscriber: Stryn.
Jdlrobson added subscribers: Pcj, Dvorapa, Liuxinyu970226 and 2 others.
Jdlrobson added subscribers: alexhollender, ovasileva.

Heads up @alexhollender @ovasileva likely to be part of advanced editor contributions project

Change 461850 had a related patch set uploaded (by Jdlrobson; owner: Bartosz Dziewoński):
[mediawiki/skins/MinervaNeue@master] Less harsh failure mode when attempting to undo in mobile editor

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

Change 461850 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Less harsh failure mode when attempting to undo in mobile editor

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

Note that an undo may also be desirable for your own edits, in case you make an edit and then you realize something went very wrong.

Tbayer added a subscriber: Tbayer.
ovasileva triaged this task as High priority.Nov 15 2018, 10:39 PM
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:

@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:

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?

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

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 :)

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:

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....

@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.

Pcj removed a subscriber: Pcj.Dec 13 2018, 11:11 AM

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.


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

Jdlrobson added a comment.EditedDec 13 2018, 5:30 PM

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

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.


*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

Masumrezarock100 added a comment.EditedJul 13 2019, 11:34 AM

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
Masumrezarock100 triaged this task as High priority.Sep 20 2019, 12:09 PM

Removed an archived project tag.

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?

4nn1l2 added a subscriber: 4nn1l2.Oct 11 2019, 7:13 AM

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:

Masumrezarock100 added a comment.EditedOct 11 2019, 3:31 PM

@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.Wed, Nov 6, 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.

Masumrezarock100 added a comment.EditedThu, Nov 7, 2:03 AM

@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.

Masumrezarock100 added a comment.EditedSat, Nov 9, 6:25 AM

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