한국   대만   중국   일본 
? T78550 The undo link in the page history leads to the source editor and not VisualEditor
Page Menu Home Phabricator

The undo link in the page history leads to the source editor and not VisualEditor
Open, Needs Triage Public 8 Estimated Story Points

Description

The undo link in the page history leads to the source editor and not VisualEditor. It should lead to the VisualEditor for people who prefer to use it.

It's probably not a high priority at this point, but if the VisualEditor is supposed to replace the source editor, this issue should be handled at some point.

Related Objects

Status Subtype Assigned Task
Open Release None
Resolved ? AlexMonk-WMF
Open None
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Resolved PRODUCTION ERROR Krenair
Resolved Krenair
Resolved Krenair
Resolved Krenair
Declined ? Whatamidoing-WMF
Resolved Krenair
Resolved Krenair
Invalid Krinkle
Resolved Krenair
Resolved Krenair
Open None
Open None

Event Timeline

Amire80 raised the priority of this task from to Needs Triage .
Amire80 updated the task description. (Show Details)
Amire80 added a project: VisualEditor .
Amire80 changed Security from none to None.
Amire80 subscribed.

Suggest that specifically the undo link should lead to the editing interface selected in the user preferences or, in the absence of preference, to the default editor.

Krenair subscribed.

When you press an undo button, not only do we set the revision text to the previous revision, but we also set up the standard revert summary as the default summary, and show the diff they're about to cause, and show a warning. I'm wondering what a similar experience in VE would look like.

the VisualEditor is supposed to replace the source editor

Thunders and lightnings!

For some reasons I thought this was already fixed? It's particularly annoying/confusing on SET wikis.

I just hit this problem in my pet project, which has SET with VE enabled by default to everyone. Indeed, this problem is more annoying in this context because then editors who preferred VE or who didn't even use the wikitext editor are left with two problems after clicking Undo:

  1. They are now facing a wikitext UI.
  2. Their preference has now changed to wikitext, which means that all future edits will be presented on wikitext unless they find out how to bring VE back.

Change 323357 had a related patch set uploaded (by Alex Monk):
[WIP] Undo support

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

This is higher priority with the new source mode.

Dvorapa raised the priority of this task from Low to Needs Triage . Mar 8 2018, 8:13 PM

@Esanders : Yes, the priority should be higher. @Esanders , @AlexMonk-WMF ( @Krenair ): What is the status of this? How far is the patch to merge?

I came across this issue while working on T185548: Undo notification is not sent if the editor switches to the visual editor , which in turn led me to T185542: Undo doesn't work, if you switch to the visual mode .

I rebased the patch on master and overall it works (nice work!), but there are a few small issues:

  1. Undo notifications are still broken per T185548 because undidRevId isn't set when updating via the API (it's currently only set in WikiPage.php 's doEditContent() . This should be pretty easy to fix and I could push a commit to this patchset if you'd like.
  2. The edit summary is no longer working. As noted in T185542: Undo doesn't work, if you switch to the visual mode (item 5 in the task description), the edit summary used to correctly autopopulate with VE but it doesn't with this patch.
  3. When going to "View history" and then clicking on "Undo", I'd often be prompted by VE that "This page was edited since you last loaded it." VE then prompts to resume editing or start a new edit. If you click "Resume editing" the diff review won't show, but if you click "start a new edit", it will.
  4. Something is not quite right with auto-save functionality (line 518 of ArticleTarget.js ). If you don't comment out surfaceModel.restoreChanges(); , then VE informs you "Changes recovered" and you don't see the diff window.

All of these seem pretty minor. I may have some time to work on them this week so I can move forward on resolving T185548 , just let me know.