Page MenuHomePhabricator

NWE: Icons after external links missing in preview
Closed, ResolvedPublic8 Estimated Story Points

Description

Steps to reproduce:

  1. Open a page for editing in NWE.
  2. Add an external link, e.g. [https://example.org example.org]
  3. Preview the change.

Expected:
There should be the external link icon after the link.

Actual:
The icon is missing, as the .mw-body class is missing (https://phabricator.wikimedia.org/diffusion/SVEC/browse/master/components/externalLinks.less), other skins might require other classes.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Note that this styling is under mw-body, because external links are not only present inside content, but inside other parts of the UI as well. Applying mw-body to the fullscreen overlay of OOUI, seems to change the font-size, so it requires a bit of care to get just just right I suspect.

matmarex renamed this task from NWE: Icons after external links missing in preview (Vector skin) to NWE: Icons after external links missing in preview.Jan 20 2017, 10:43 PM
matmarex subscribed.

(Not limited to Vector, actually. Core styles have the same problem.)

Note that just resolving T155863 won't fix this, as Parsoid's rendering (which is used for the preview) uses different HTML markup for external links, which doesn't match the CSS we have.

Jdforrester-WMF set the point value for this task to 8.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.

I plan on using the $('[rel="mw:ExtLink]').addClass('external') hack because T58756 has been unresolved for three and a half years.

Change 341204 had a related patch set uploaded (by esanders):
[mediawiki/extensions/VisualEditor] Add external classes to mw:ExtLinks in NWE preview

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

Change 341204 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor] Add external classes to mw:ExtLinks in NWE preview

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