Page MenuHomePhabricator

Don't display interwiki links with external icon in VE
Closed, DuplicatePublic

Description

They should probably look the same.

This link is of the form: [[:en:Knowledge Graph|Knowledge Graph]].

Screenshot in read mode:

Screen Shot 2015-06-23 at 18.31.19.png (654×388 px, 67 KB)

Screenshot in edit mode:

Screen Shot 2015-06-23 at 18.31.25.png (520×368 px, 56 KB)

Permalink to the diff/section in question:

https://www.mediawiki.org/w/index.php?title=User:Deskana_(WMF)/Proposals/Zerorate&oldid=1688789

Event Timeline

Deskana raised the priority of this task from to Needs Triage.
Deskana updated the task description. (Show Details)
Deskana added a project: VisualEditor.
Deskana subscribed.
Deskana renamed this task from Cross-wiki links look different in read mode and edit mode to Cross-wiki links look different in read mode and edit mode, instead looking like external links when viewed in edit mode.Jun 24 2015, 1:33 AM
Deskana set Security to None.
Krenair renamed this task from Cross-wiki links look different in read mode and edit mode, instead looking like external links when viewed in edit mode to VE treats interwiki links as external links.Jul 1 2015, 11:24 PM

I made an interwiki link like [[wikipedia:asdwqe]], it showed up without the external icon, then when I opened it in VE it had the external icon... And when I went to edit it, it was apparently an external link to https://en.wikipedia.org/wiki/asdwqe (and if you edit this to point to a different enwiki page, it knows how to generate the interwiki syntax again with the new target title)

Apparently this is a Parsoid thing:
<a rel="mw:ExtLink" href="https://en.wikipedia.org/wiki/asdwqe" title="wikipedia:asdwqe" data-parsoid='{"stx":"piped","a":{"href":"https://en.wikipedia.org/wiki/asdwqe"},"sa":{"href":"wikipedia:asdwqe"},"isIW":true,"dsr":[0,30,19,2]}'>interwiki</a>

Yes, Parsoid used to distinguish these and got rid of the DOM distinction.

We could modify modules/ve-mw/ce/annotations/ve.ce.MWExternalLinkAnnotation.js to only addClass( 'external' ) if !JSON.parse( model.element.originalDomElements[0].getAttribute( 'data-parsoid' ) ).isIW.

But apparently that's bad.

Krenair renamed this task from VE treats interwiki links as external links to Don't display interwiki links with external icon in VE.Jul 2 2015, 1:52 AM
Krenair added a project: Parsoid.

I don't know why it was removed, but Parsoid should restore the DOM distinction between these. Users expect interwiki links not to be marked as external, presumably because the are more trustworthy.

Is this a duplicate of T102556 ?

No, it's the reverse. T102556 asks for VE to be able to tell Parsoid whether URL links should be serialized as interwiki links or external links, whereas this task asks for Parsoid to indicate whether links that it marks as external are actually external or just interwiki links (right now the Parsoid output doesn't distinguish).

@ssastry Is this something your team could take a quick look at to gauge the difficulty of a fix? Thanks. :-)

@ssastry Is this something your team could take a quick look at to gauge the difficulty of a fix? Thanks. :-)

Yes, i've added it to tomorrow's team meeting agenda.