Page MenuHomePhabricator

Historic visual diff displays change completely unrelated to actual change
Closed, ResolvedPublic1 Estimated Story Points

Description

https://de.wikipedia.org/w/index.php?title=Internationale_Mathematik-Olympiade&type=revision&diff=171058605&oldid=168859035&diffmode=visual just shows the reference 13. If you switch to the wikitext diff, you'll see that actually some words were linked and an empty line has been added, neither change even near to that reference.

Event Timeline

Schnark created this task.Feb 17 2018, 10:16 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptFeb 17 2018, 10:16 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Schnark renamed this task from Historic visual diff displays change complete unrelated to actual change to Historic visual diff displays change completely unrelated to actual change.Feb 17 2018, 10:25 AM

This is probably a RESTbase ID change issue.

Deskana triaged this task as Medium priority.Feb 20 2018, 7:49 PM
Deskana set the point value for this task to 1.
Deskana moved this task from To Triage to Current work on the VisualEditor board.
Deskana edited projects, added VisualEditor (Current work); removed VisualEditor.
Tchanders moved this task from Incoming to In progress on the VisualEditor (Current work) board.

Change 414110 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[VisualEditor/VisualEditor@master] Filter out meaningless properties when comparing elements

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

Change 414111 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[VisualEditor/VisualEditor@master] Stop diffing originalHTML for internal items

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

Change 414110 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Filter out meaningless properties when comparing elements

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

The fact that it isn't showing the blockquote diff is a separate issue. It seems blockquotes aren't even editable in visual editor, so it makes sense that the in-editor diff doesn't handle them.

I suppose this is a tricky thing about making visual historical diffs via visual editor - they will still be subject to visual editor's limitations. (This is probably a conversation to be had elsewhere though...)

Change 413904 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (d946b72)

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

Change 414111 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Stop diffing originalHTML for internal items

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

Change 413904 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (08520dc)

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

Change 413904 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (e6b9330)

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

The fact that it isn't showing the blockquote diff is a separate issue. It seems blockquotes aren't even editable in visual editor, so it makes sense that the in-editor diff doesn't handle them.

This blockquote is indeed not editable visually, but why? It's possible to switch between a simple paragraph and a blockquote via the menu or Ctrl+8/Ctrl+0, and when you transform a paragraph into a blockquote, you can still edit it. But even if you transform the blockquote in that article into a normal paragraph, you still can't edit it. So something weird (and unrelated to diffs) is going on.

On the other hand, even if something isn't editable visually, you could still show it in diffs. If it changed in some way, put the old version into del, and the new into ins, and the diff will be correct (though probably not ideal, see T188170).

It's actually not the blockquote being uneditable, it's the paragraph inside it, which if anything makes this even stranger. Maybe we just can't handle <p> nested inside <blockquote>?

Minimal example to reproduce this (both the uneditable blockquote, and the diff problems):

  1. Make a page with the following contents:
<blockquote>
bar
</blockquote>
  1. Change 'bar' to 'foo'.



(please excuse the broken localisation messages on my testing wiki)

The wikitext parses to <blockquote><p>foo</p></blockquote> in HTML, and VisualEditor can't edit such a structure (it probably could, but we don't allow the user to create such nesting in the editor, so it would be easy to accidentally mess it up).

(I found this out by placing a breakpoint in ve.dm.AlienNode.static.toDataElement and going up the call stack into ve.dm.Converter)

This blockquote issue is filed as T86794.

Deskana closed this task as Resolved.Feb 26 2018, 4:08 PM

On the other hand, even if something isn't editable visually, you could still show it in diffs. If it changed in some way, put the old version into del, and the new into ins, and the diff will be correct

Filed as T188833