Page MenuHomePhabricator

OptionWidget has icon: 'check' in default settings for all themes, but only Apex needs this
Closed, ResolvedPublic

Description

All MenuOptionWidget have a check icon. This icon is hidden in the normal state and shown in the selected state, regardless of the theme being used. When adjusting the selected state of the MenuOptionWidget for the MediaWiki theme in rGOJU873bfeb208646cd24cf7f92d357336b38865b72e, we decided to not show the check icon in the selected state either (for the MediaWiki theme only). Currently in a DropdownWidget the MenuOptionWidget looks like this:

Apex (with icon)MediaWiki (without icon
Screen Shot 2017-03-27 at 12.25.18 PM.png (242×663 px, 24 KB)
Screen Shot 2017-03-27 at 12.26.15 PM.png (238×666 px, 24 KB)

So this check icon is only being used by the Apex theme and is still being added everywhere. To fix this we could remove the check icon from MenuSectionOption widget, and:

  1. ...have Apex add it through CSS (like mediawiki theme does with Tool, see below)
  2. ...change the way the selected state looks like in Apex:
    • ...to match the mediawiki theme
    • ...to have a gray background when the option is selected
    • ideas?

This icon should not be confused with the check icon seen in Tool in the mediawiki theme. It's not added through javascript (like in the case of MenuOptionWidget), and is only added in the mediawiki theme.

Event Timeline

matmarex assigned this task to TrevorParscal.
matmarex raised the priority of this task from to Needs Triage.
matmarex updated the task description. (Show Details)
matmarex added a project: OOUI.
matmarex added subscribers: matmarex, Prtksxna.
Jdforrester-WMF set Security to None.
matmarex lowered the priority of this task from Medium to Low.Feb 5 2015, 5:30 PM

@Prtksxna Thanks for the task description update. I've forgot about the check in MenuToolGroup/MediaWiki. Personally I'd prefer a CSS-only solution from an architectural view, if I don't miss out something technical important.

@Esanders what would be your preferred solution? Is adding the check through CSS in Apex okay?

From IRC chat @Prtksxna :

Volker_E> edsanders: check icon through CSS-only ok from your POV? https://phabricator.wikimedia.org/T87835
edsanders> Seems ok - would it prevent menu options from having other icons?
Volker_E> edsanders: no, it needs to be able to still take any icon as intended

Change 348098 had a related patch set uploaded (by Prtksxna):
[oojs/ui@master] MenuOptionWidget: Stop adding check icon

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

Change 348098 merged by jenkins-bot:
[oojs/ui@master] MenuOptionWidget: Remove theme-independent 'check' icon

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

Volker_E edited projects, added OOUI (OOjs-UI-0.21.1); removed OOUI.
Volker_E removed a project: Patch-For-Review.
Volker_E updated the task description. (Show Details)
Volker_E removed a subscriber: gerritbot.