Page MenuHomePhabricator

VisualEditor: Surface should be able to inherit commands and toolbar from other surface
Closed, ResolvedPublic8 Estimated Story Points


Right now, we have to do the following in ve.ui.MWReferenceDialog and ve.ui.MWMediaDialog to set up the sub-editor's surface correctly:

this.referenceSurface.addCommands( );

Instead of accessing (and assuming all surfaces with MW*Dialogs will be instantiated by, we should just be able to say "initialize this new surface based on this existing surface".

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:08 AM
bzimport added a project: Technical-Debt.
bzimport set Reference to bz49439.

Stylesheets should be inherited as well (and be loaded by the surface rather than the dialog) so we don't have to do things like

ve.ui.MWReferenceDialog.static.addLocalStylesheets( [
] );

Not just inherit, but also block from inheritance for specific instantiations (e.g. the caption of an image inside a reference can't take a reference - bug 58270).