Page MenuHomePhabricator

VisualEditor: Extract red link API code from VE and put into Parsoid
Closed, ResolvedPublic

Description

Duplicated logic is bad.


Version: unspecified
Severity: enhancement

Related Objects

StatusSubtypeAssignedTask
OpenReleaseNone
OpenNone
OpenNone
OpenNone
OpenFeatureNone
OpenNone
DeclinedNone
ResolvedCatrope
ResolvedSbailey
Resolved GWicke
ResolvedNone
Resolvedssastry
ResolvedArlolra
ResolvedDbrant
Resolved bearND
Resolved Mholloway
ResolvedNone
DuplicateNone
ResolvedJdforrester-WMF
Resolved bearND
OpenNone
ResolvedArlolra
ResolvedEsanders
ResolvedCatrope

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:00 AM
bzimport added a project: Technical-Debt.
bzimport set Reference to bz62803.

(In Parsoid or whatever; the point is, this code should be re-useable by Flow, OCG and anyone else rather than buried inside VE.)

For static pages we should be able to do this with CSS retrieved from an API. We'll provide this API for normal pages.

For dynamic hints during editing we'd still need to inject styles dynamically. The latter would probably remain VE-specific.

(In reply to Gabriel Wicke from comment #2)

For static pages we should be able to do this with CSS retrieved from an
API. We'll provide this API for normal pages.

*nods*

For dynamic hints during editing we'd still need to inject styles
dynamically. The latter would probably remain VE-specific.

Yeah, but Flow/etc. may want to style too.

Red link code is now in Parsoid so can be removed from VE

Red link code is now in Parsoid so can be removed from VE

Will need us to round-trip new links, though. Right now we pick how to render them with local code which is pretty speedy.

Change 492358 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] ApiVisualEditor: Remove red-link cache warming

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

Esanders moved this task from Incoming to Code review on the VisualEditor (Current work) board.
Esanders removed subscribers: TrevorParscal, GWicke.

QA: Check that links are still the correct colours, and that additional API requests aren't being fired when initialising the page.

Change 492358 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ApiVisualEditor: Remove red-link cache warming

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

So I verified that the correct color is showing up for different kinds of links. Regarding the API requests, I am not sure which ones I should consider as "additional". I have moved this task to Engineering QA if that's a better suited task for engineers.

QA: Check that links are still the correct colours, and that additional API requests aren't being fired when initialising the page.