Page MenuHomePhabricator

VisualEditor: Create infrastructure for creating annotations/nodes from the UI
Open, MediumPublic


Right now, MWLinkInspector needs to know exactly how to construct a new link annotation with the right attributes. This pattern is repeated (albeit somewhat less egregiously) for every single annotation and node created by any UI component anywhere. This is horrible. The DM should provide helpers so UI classes can much more easily create linmod elements from data.

Update, 2015-08-25: We now have a bespoke method for the MW link inspector, but the general pattern across VE's UI is still there.

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:01 AM
bzimport added a project: Technical-Debt.
bzimport set Reference to bz62816.
Catrope created this task.Mar 19 2014, 2:01 AM
Jdforrester-WMF lowered the priority of this task from High to Medium.Jan 9 2015, 10:55 PM

Change 231155 had a related patch set uploaded (by Cscott):
Builder for

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 12 2015, 9:24 PM
cscott added a subscriber: cscott.Aug 13 2015, 5:24 PM

From IRC:

James_F: RoanKattouw says that for T64816 something that every UI tool can call (name not really thought of; #constructMe() or whatever) was what he was thinking.

The patch in is just a tiny start, it makes it a little easier to construct correct objects given a mw.Title. It doesn't address the bigger picture, since I don't really have a solid grasp on the bigger picture.

Change 231155 merged by jenkins-bot:
Builder for

Change 233727 had a related patch set uploaded (by Esanders):
Use new internal link builder

Change 233727 merged by jenkins-bot:
Use new internal link builder