Page MenuHomePhabricator

MenuTagMultiselectWidget does not support icons in menu
Closed, ResolvedPublic1 Estimated Story Points


The menu items in MenuTagMultiselectWidget could theoretically support icons but does not in the current implementation. Example code which I expect to generate menu items with icons:

var widget =  new OO.ui.MenuTagMultiselectWidget( {
    options: [
            data: 'user',
            label: ' User Namespace',
            icon: 'userAvatar'
} );

A workaround, for now, is to subclass MenuTagMultiselectWidget and either
a) override createMenuOptionWidget (with a lookup mechanism data => icon)
b) override both addOptions and createMenuOptionWidget to use the full extent of available menu item config options

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 19 2017, 11:18 AM
Volker_E moved this task from Backlog to Next-up on the OOUI board.Feb 2 2018, 2:15 AM

Change 435806 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] MenuTagMultiselectWidget: Allow icons in dropdown menus

Volker_E moved this task from Next-up to Reviewing on the OOUI board.May 28 2018, 3:47 PM

Change 435806 merged by jenkins-bot:
[oojs/ui@master] MenuTagMultiselectWidget: Allow icons in dropdown menus

Volker_E closed this task as Resolved.Jun 4 2018, 10:10 PM
Volker_E claimed this task.
Volker_E triaged this task as Low priority.
Volker_E moved this task from Reviewing to OOUI-0.27.2 on the OOUI board.
Volker_E edited projects, added OOUI (OOUI-0.27.2); removed OOUI.
Volker_E removed a project: Patch-For-Review.
Volker_E removed a subscriber: gerritbot.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

This was released in OOUI v0.27.2, which will roll out with MediaWiki 1.32.0-wmf.8.

Jdforrester-WMF set the point value for this task to 1.Jun 13 2018, 6:23 PM