Page MenuHomePhabricator

NWE: Icons after external links missing in preview
Closed, ResolvedPublic8 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

Schnark created this task.Dec 16 2016, 8:10 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 16 2016, 8:10 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
TheDJ added a subscriber: TheDJ.Dec 16 2016, 10:04 AM

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 added a subscriber: matmarex.

(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 triaged this task as Lowest priority.Feb 21 2017, 8:19 PM
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

Jdforrester-WMF closed this task as Resolved.Mar 7 2017, 6:31 PM
Jdforrester-WMF assigned this task to Esanders.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 7 2017, 6:31 PM