Page MenuHomePhabricator

VisualEditor: ve.ui.Context#toolbar is null in MediaWiki
Closed, ResolvedPublic

Description

Following the documentation[1] starting at ve.ui.Surface (from ve.instances[0]) one would go to #getContext and access .toolbar. But though that property is defined, it is set to null.

I'm not sure why, but apparently our MediaWiki's init is instantiating its own and is only accessible from ve.init.mw.ViewPageTarget#toolbar (ve.init.mw.targets[0].toolbar).

It probably shouldn't have to instantiate its own one, and certainly not make it inaccessible to the rest of VE.

[1] https://doc.wikimedia.org/VisualEditor/master/#!/api/ve.ui.Surface


Version: unspecified
Severity: enhancement

Details

Reference
bz52011

Event Timeline

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

There used to be a .toolbar property because the context had its own (local) toolbar to show the contextual tools in. This has been replaced with ContextWidget (which isn't a toolbar) which groups ContextItemWidget (which aren't tools), and now there is no .toolbar property.