Page MenuHomePhabricator

Historical visual diff sometimes shows extraneous changes for a single-line addition
Closed, ResolvedPublic1 Story Points

Description

Hello the VisualDiffs tool that was deployed this week sometimes can't recognize the particular place of the change. If one line was added, it can show 20 lines removed and 21 added. See, for example, here. Can it be fixed, please? Thank you.

Wikitext:

Visual:

Details

Related Gerrit Patches:
mediawiki/extensions/VisualEditor : masterUpdate VE core submodule to master (8231b4d88)
VisualEditor/VisualEditor : masterVisualDiff: Add test for add-simliar-and-indent
VisualEditor/VisualEditor : masterSeparate out list, leaf and tree diffs

Event Timeline

IKhitron created this task.Feb 17 2018, 9:14 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptFeb 17 2018, 9:14 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Deskana changed the task status from Open to Stalled.Feb 19 2018, 12:05 PM
Deskana added a subscriber: Deskana.

Your report is very unclear, so I do not understand what it means.

Please provide exact reproduction steps, and write what you expected to happen and what actually happened.

IKhitron updated the task description. (Show Details)Feb 19 2018, 12:36 PM

Your report is very unclear, so I do not understand what it means.
Please provide exact reproduction steps, and write what you expected to happen and what actually happened.

Hello, Deskana. Please accept my appologies. I did not pay attention that the link I provided included "cur", so it became irrelevant with new revisions arrival. I changed it to "next" now. Please check it again. Thank you very much and sorry one more time.

Deskana changed the task status from Stalled to Open.Feb 19 2018, 12:53 PM

That's helpful. Thank you.

I don't read Hebrew, but from looking at the wikitext diff, it's clear the visual diff isn't quite right.

Deskana renamed this task from VisualDiffs algorithm should be improved to Historical visual diff sometimes shows extraneous changes for a single-line addition.Feb 19 2018, 12:53 PM
Deskana triaged this task as Low priority.
Deskana updated the task description. (Show Details)
Deskana moved this task from To Triage to TR6: Visual diffs on the VisualEditor board.
Deskana set the point value for this task to 1.

Great, thank you, @Deskana!
But it does not look like as it was earlier today. I saw all the lines of the sections in red, and then once again in green.

Thanks for this, I've seen other examples like it.

It's a problem with the nested lists - the diff matches up the wrong paragraphs, so it looks like an insertion and a change, instead of just an insertion. It is correct from an HTML-structure point of view, but definitely not the best diff from the human reader's point of view! I have been thinking for a while that we should solve this by treating lists as a special case, and comparing each paragraph rather than the HTML structure.

Tchanders claimed this task.Apr 2 2018, 4:58 PM
Tchanders edited projects, added VisualEditor (Current work); removed VisualEditor.
Tchanders moved this task from Incoming to In progress on the VisualEditor (Current work) board.

Change 428259 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[VisualEditor/VisualEditor@master] WIP Separate out list diffs

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

Change 428259 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Separate out list, leaf and tree diffs

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

Confirmed that the above patch works on master.

Change 439593 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] VisualDiff: Add test for add-simliar-and-indent

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

Change 439593 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] VisualDiff: Add test for add-simliar-and-indent

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

Change 439624 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (8231b4d88)

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

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

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

Deskana closed this task as Resolved.Jun 18 2018, 3:43 PM