Page MenuHomePhabricator

Historical visual diff sometimes shows extraneous changes for a single-line addition
Closed, ResolvedPublic1 Estimated 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:

Screen Shot 2018-02-19 at 12.54.02.png (558×2 px, 143 KB)

Visual:

Screen Shot 2018-02-19 at 12.54.13.png (404×2 px, 178 KB)

Event Timeline

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

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.

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.

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