Page MenuHomePhabricator

Provide an API to modify toolbar buttons
Closed, DeclinedPublic

Description

Right now, the docs (http://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization#Modifying_things) say:

"We don't really have a nice API to modify things, unfortunately"

An API for this would make ProveIt (an extension i work on that does this) cleaner and more reliable. Right now, there seems to be a race condition where sometimes it works, and sometimes it doesn't.

The workaround in the docs does not make clear whether to wrap the modification bind in mw.loader.using( 'ext.wikiEditor.toolbar',. I think not, because then it might be too late when the modifier's (ProveIt's) code runs.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=23624

Details

Reference
bz42810

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:54 AM
bzimport added a project: WikiEditor.
bzimport set Reference to bz42810.
bzimport added a subscriber: Unknown Object (MLST).
Krinkle added a subscriber: Krinkle.

The existing API seems to allow addition, removal and modification. Perhaps not in the easiest way imaginable, but I doubt introducing a different API makes sense at this point. It's probably more important to ensure the existing and documented methods are stable going forward.