Page MenuHomePhabricator

Label hack in API sandbox does nothing
Closed, ResolvedPublic

Description

Since https://gerrit.wikimedia.org/r/#/c/332398 you can't pass a $label to a fieldLayout so the hack in mediawiki.special.sandbox.js L:1582 does nothing.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 29 2017, 12:00 PM
Anomie added a subscriber: Anomie.EditedMay 1 2017, 2:29 PM

I don't know what "IE hack" you're talking about here. ApiSandbox is passing $label so it can set a 'click' event on it, FieldLayout's sometimes-forwarding isn't sufficient. There doesn't seem to be a documented way to get the generated label element, only to set it.

Change 351336 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] mw.special.apisandbox: Don't pass $label to OO.ui.FieldLayout

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

Anomie claimed this task.May 2 2017, 4:37 PM
Anomie moved this task from Needs details or plan to Needs Review on the MediaWiki-API board.

I don't know what "IE hack" you're talking about here.

I must be going senile - I thought I read "InternetExplorer" in a comment, but apparently not.

Esanders renamed this task from IE label hack in api sandbox does nothing to Label hack in API sandbox does nothing.May 2 2017, 8:59 PM
Volker_E moved this task from Backlog to Reviewing on the OOUI board.May 3 2017, 5:49 AM

I didn't realize that this even could be done, much less that somebody would actually be doing it. Sorry.

I think that this entire thing is actually a bug in OOjs UI – you shouldn't need to override bits of FieldLayout to make it focus the field when the label is clicked. I filed T164506 for this. I think we can clean up a few gnarly things if we make this work consistently, actually.

Change 351336 merged by jenkins-bot:
[mediawiki/core@master] mw.special.apisandbox: Don't pass $label to OO.ui.FieldLayout

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

matmarex closed this task as Resolved.May 4 2017, 6:00 PM
matmarex removed projects: Patch-For-Review, OOUI.