Page MenuHomePhabricator

MenuSelectWidget width config
Closed, ResolvedPublic

Description

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

Details

Related Gerrit Patches:

Event Timeline

Jdoggs91 created this task.Jul 4 2019, 12:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 4 2019, 12:50 PM
Jdoggs91 updated the task description. (Show Details)Jul 4 2019, 12:52 PM

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

https://gerrit.wikimedia.org/r/520795

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

https://gerrit.wikimedia.org/r/520795

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

https://gerrit.wikimedia.org/r/521875

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

https://gerrit.wikimedia.org/r/521875

Jdforrester-WMF closed this task as Resolved.Jul 10 2019, 5:21 PM
Jdforrester-WMF assigned this task to matmarex.
Jdforrester-WMF edited projects, added OOUI (OOUI-0.33.2); removed OOUI.