Page MenuHomePhabricator

"Moved paragraph" arrows in diffs show broken page previews
Closed, ResolvedPublic

Description

Bug description
The "moved paragraph" arrows we introduced with T139603: Show text changes when moving text chunks (#2) activate Page-Previews now and show broken popups:

Screenshot from 2019-05-09 11-06-04.png (331×921 px, 62 KB)

This is because the link is an anchor link that points to the same page, with a fragment that points to the other side of the diff, e.g. #movedpara_5_0_rhs. These links do have a href and a title and are therefor considered possibly page links. They are not listed as BLACKLISTED_LINKS.

Possible fixes:

  • Just adding diff-marker a to the blacklist might solve the issue already.
  • We can as well add class="internal" to the arrow links in wikidiff2. This is already in the blacklist.

Here it can be reproduced: https://de.wikipedia.org/w/index.php?title=Benutzer:TMg/userHighlight.js&diff=188320699&oldid=151101364
Here it can not: https://de.wikipedia.org/w/index.php?diff=187227445&oldid=187227390&title=Benutzer:Christoph_Jauera_(WMDE)/Wikidiff2&type=revision&diffmode=source

Acceptance Criteria

  • There is no page preview for diff pages

Event Timeline

thiemowmde triaged this task as Medium priority.May 9 2019, 10:45 AM
thiemowmde updated the task description. (Show Details)

Change 509392 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Popups@master] Don't interfere with wikidiff2 moved arrows

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

The .js or more specific the . in the title seems to be the reason for the popups showing in one case and not in the other.

Change 509452 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Popups@master] Avoid popups on self links with file extension

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

Change 509452 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Avoid popups on self links with file extension

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

Change 509392 abandoned by Awight:
Don't interfere with wikidiff2 moved arrows

Reason:
Glad to hear this is unnecessary!

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

Verified working for the original links.