Page MenuHomePhabricator

LabelElement: 'labelChange' event missing documented parameter `value`
Closed, ResolvedPublicBUG REPORT

Description

The labelChange event in LabelElement is documented[1] as having a parameter, @param {string} value.
However, the two places that trigger the event do so without any parameters[2][3], just this.emit( 'labelChange' );.
Either the parameter should be added, or the documentation corrected.

[1] https://gerrit.wikimedia.org/g/oojs/ui/+/9cbee0a5b5132a8ea0388a058002c23ee01de404/src/mixins/LabelElement.js#44
[2] https://gerrit.wikimedia.org/g/oojs/ui/+/9cbee0a5b5132a8ea0388a058002c23ee01de404/src/mixins/LabelElement.js#177
[3] https://gerrit.wikimedia.org/g/oojs/ui/+/9cbee0a5b5132a8ea0388a058002c23ee01de404/src/mixins/LabelElement.js#197

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
DannyS712 changed the subtype of this task from "Task" to "Bug Report".Sep 11 2021, 1:42 AM
DannyS712 moved this task from Unsorted to Reports on the User-DannyS712 board.
matmarex subscribed.

It was not meant to have a parameter, this was probably copied from the 'change' event by mistake.

Change 722636 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[oojs/ui@master] LabelElement: Remove non-existent parameter from 'labelChange' event doc

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

Change 722636 merged by jenkins-bot:

[oojs/ui@master] LabelElement: Remove non-existent parameter from 'labelChange' event doc

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

Volker_E triaged this task as Low priority.
Volker_E moved this task from Backlog to OOUI-0.42.1 on the OOUI board.
Volker_E edited projects, added OOUI (OOUI-0.42.1); removed OOUI.
Volker_E edited projects, added Documentation; removed Patch-For-Review.

Change 736621 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update OOUI to v0.42.1

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

Change 736621 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.42.1

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