Page MenuHomePhabricator

Language widget on Special:Preferences is slow to load
Open, Needs TriagePublic

Description

Long select widgets take a long time to setup in OOUI, this one takes about 200ms.

In most cases the user will not touch the widget, so we should probably wait for them to interact with it before infusing.

Event Timeline

Esanders created this task.Sep 12 2018, 9:46 AM

In most cases the user will not touch the widget, so we should probably wait for them to interact with it before infusing.

I think we could do this more easily by making DropdownInputWidget lazy-initialize the menu.

Lazy-infusing a widget on click might indeed lead to weird interactions, but it should be perfectly possible to infuse it as normal, but not generate all the MenuOptionWidgets until the dropdown handle is clicked. You could do that in a subclass of DropdownInputWidget, but really vanilla DropdownInputWidget could work that way too…

Something very similar is already implemented in mw.rcfilters.ui.MenuSelectWidget (which fills itself from the toggle() method), surely it will also work for DropdownInputWidget, which is much simpler.