Page MenuHomePhabricator

mw.cx.ui.MenuLabelWidget: Upstream has made some breaking changes, beware
Closed, ResolvedPublic

Description

Suggested by @matmarex whilst looking at T218722:

16:16:21 <+MatmaRex> James_F: a similar bug may also affect ContentTranslation – mw.cx.ui.MenuLabelWidget looks similar to MenuSectionOptionWidget (and also has .static.selectable = false)
16:17:12 <+MatmaRex> James_F: i'm off for now, sorry. leaving this in your capable hands. please also file a bug for the CX team to look at or something

Event Timeline

Change 498093 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Remove mw.cx.ui.MenuLabelWidget

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

There was no infinite loop in "New translation" dialog, which uses mw.cx.ui.MenuLabelWidget for menu labels.

However, I have removed that widget and use OOUI's native OO.ui.MenuSectionOptionWidget since two widgets are almost same. That reduces code duplication, but also prevents bugs caused by possible future OOUI changes, since this.selected was not defined in mw.cx.ui.MenuLabelWidget, as the initialization was removed from the parent class.

Jdforrester-WMF renamed this task from Possible CX UBN? to mw.cx.ui.MenuLabelWidget: Upstream has made some breaking changes, beware.Mar 21 2019, 11:52 PM
Jdforrester-WMF triaged this task as Medium priority.

Re-labelling after Petar's confirmation. :-)

Change 498093 merged by Petar.petkovic:
[mediawiki/extensions/ContentTranslation@master] Remove mw.cx.ui.MenuLabelWidget

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