Page MenuHomePhabricator

MenuSelectWidget width config
Closed, ResolvedPublic


The doc block for the MenuSelectWidget lists the width as a parameter, which stops it from being displayed in the autodocumentation however in code it is implemented as config.
Doc block:

* @param {number|string} [width] Width of the menu as a number of pixels or CSS string with unit
*  suffix, used by {@link OO.ui.mixin.ClippableElement ClippableElement}

In code:

// Properties
this.width = config.width;

Pretty sure that @param in the doc block should just be @cfg

Event Timeline

Indeed, well spotted! Looks like this was incorrectly copy-pasted from the documentation of OO.ui.mixin.ClippableElement.prototype.setIdealSize.

Change 520795 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] docs: Fix MenuSelectWidget 'width' documentation

Change 520795 merged by jenkins-bot:
[oojs/ui@master] docs: Fix MenuSelectWidget 'width' documentation

Change 521875 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/core@master] Update OOUI to v0.33.2

Change 521875 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.33.2

Jdforrester-WMF assigned this task to matmarex.
Jdforrester-WMF edited projects, added OOUI (OOUI-0.33.2); removed OOUI.