See https://de.wikipedia.org/w/index.php?title=Herstellerpr%C3%A4fix&diff=159494033&oldid=158095292&visualdiff=1 (also a nice testcase for changes inside moved blocks, by the way). This change introduced 2 new references. The diff shows changes to all following references, which should be ignored.
|mediawiki/extensions/Cite : master||VisualDiff: Show less information about ref nodes|
|Open||None||T105173 HTML diffs of edits for everything|
|Open||None||T167508 Visual diff: Make VE visual diffs available for historical diffs via MediaWiki's DiffView page|
|Open||None||T170235 Visual diff (on history page) shows changes to reference numbers caused by inserting more references|
|Resolved||Tchanders||T170269 Reference diffs not working correctly on historical diffs|
I don't know whether this correct or not, honestly.
On the one hand, the changes you made to the wikitext did change those reference numbers, and the visual diff is showing you that. On the other hand, you didn't actually touch those references in the wikitext, so it's somewhat confusing for it to point out those changes to you.
Does anyone have any thoughts?
Well, imagine a long article with many references, and you add or remove a reference near the top. Do you really want to see more or less the whole article in the diff, because everywhere the numbers changed? I doubt it. You'd have to scroll through the whole diff to see whether there are other, real changes and thus would reduce usability.
In this case I think it makes sense to consider as the relevant change those references directly affected by the user contribution (i.e., the ones added or removed) and not the side-effects on the display that those may cause in other elements.
In general is not always easy to identify which is the meaningful change for the user, but I think it helps to ask ourselves how would we describe the change to another human. In this case, I won't mention that after adding a reference other references got their number updated. Similarly, in a numbered list of 100 items where you remove the first item, I'd expect the highlight to focus on the deleted item and not all items in the list.
In a certain way that is what is done when a word is removed in a paragraph, where only the affected word is highlighted as a change despite the rest changing their position inside the paragraph.
Maybe showing this only if the paragraph is touched in another way could work, but then  ->  null diffs when your only edit is to re-order references would be invisible. Eh.
Just to be clear, this behaviour should not be happening and should go away once T170269 is fixed. I think if we are to discuss changes to the reference diff display it should be starting from the feature which is currently correctly working in VE, otherwise things are going to get very confusing :)
There are three types of reference moving that I can come up with.
|Only moving, no reording||Moving the position of the reference in the text in a way that does not cause any reordering|
|Only reordering, no moving||Well this is a bit of a lie, you cant reorder without moving. But its minimum moving.|
|Moving and reordering||Moving the reference across paragraphs and also causing reordering.|
Before we think of improvements, @Esanders could you confirm that this is the correct output for all three, and that there are no known bugs here?
Thanks for the examples. The reference list itself does not currently detect moves which is the issue in all three of your examples (but no the bug as reported, so we should file that separately). The ref numbering in the document looks correct...
There should be no change in the References list in the first example anyway?
(but no the bug as reported, so we should file that separately). The ref numbering in the document looks correct...
So, the issue to be filed is that when Moving and reordering the References list isn't being updated?
Example 1 is what I would expect.
In Example 2, two things could be changed (though I'm not sure that they actually should be changed):
- Additionally, the text with the reference numbers could be shown, with the reference numbers highlighted and annotated as "changed". Currently you can see that references 1 and 2 have been changed, but it's missing the context. In this example where both references belong to the same sentence this doesn't matter, but if they belonged to different sentences it would be nice to see them in the diff, too.
- Instead of showing that the two references were both completely changed, the diff could show that they were just exchanged. But given that this isn't done for normal ordered lists either (to test, exchange # Point and # Cube on your example page), I don't think this should have high priority.
In Example 3 it's debatable whether the list of references should be shown with a change, as it doesn't look the same before and after the edit, but in this case I think it makes things clearer by leaving it out. This might change when there are more changes to references, though.