Page MenuHomePhabricator

Disabled checked boxes in OOUI look identical to checked boxes that are not disabled
Closed, InvalidPublic

Description

They are both blue boxes with a white check mark in them.

Instead, disabled ones should look grey.

Event Timeline

Huji created this task.Dec 20 2016, 2:05 PM
TheDJ added a subscriber: TheDJ.Dec 20 2016, 2:10 PM

I doubt this is a OOjs issue, rather i suspect it has to do with htmlforms not translating the disabled attribute correctly or something. See also T153636: OOUI form fields do not set the dir attribute of textfields for a similar situation regarding the dir attribute.

Change 328370 had a related patch set uploaded (by Huji):
Disabled checked checkboxes in OOjs-UI should look grey

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

Huji added a comment.Dec 20 2016, 2:50 PM

@TheDJ: I manually tweaked the HTML element and made the checkbox disabled (i.e. didn't let HTMLForm get in the way). It was still blue; I explored the CSS and turns out there was no rule for checked disabled checkboxes, so I added one.

Huji added a comment.Dec 20 2016, 2:59 PM

Before:

After:

This could be programmatically a special case not covered by OOjs UI yet (but probably not recommended or desired either). If a CheckboxWidget is set to disabled, the corresponding label should be disabled as well. Not just the checkbox. That's the current implementation (see “CheckboxInputWidget (disabled)‎”.

Change 328370 abandoned by Huji:
Disabled checked checkboxes in OOjs-UI should look grey

Reason:
Wrong repo. Will submit to the correct repo.

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

Huji added a comment.Dec 20 2016, 5:17 PM

This could be programmatically a special case not covered by OOjs UI yet (but probably not recommended or desired either). If a CheckboxWidget is set to disabled, the corresponding label should be disabled as well. Not just the checkbox. That's the current implementation (see “CheckboxInputWidget (disabled)‎”.

Perhaps I should ask before I submit a new patch. My understanding is that if a checkbox is checked, it's parent element will be assigned the classes oo-ui-widget-enabled. So enabled here has to do with checked or not checked. Is that correct?

Change 328393 had a related patch set uploaded (by Huji):
Disabled checked checkboxes in OOjs-UI should look grey

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

Volker_E moved this task from Backlog to Reviewing on the OOUI board.Jan 4 2017, 1:21 AM

Change 328393 abandoned by Huji:
Disabled checked checkboxes in OOjs-UI should look grey

Reason:
You are correct; I was initiating the element incorrectly. Abandoning.

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

Huji closed this task as Invalid.Jan 19 2017, 2:41 AM

Turns out I was initiating the element incorrectly, and this feature already exists.

Volker_E moved this task from Reviewing to OOjs-UI-0.19.5 on the OOUI board.Mar 7 2017, 9:57 PM
Volker_E edited projects, added OOUI (OOjs-UI-0.19.5); removed OOUI.
Volker_E moved this task from OOjs-UI-0.19.5 to Invalid/Declined/Duplicate on the OOUI board.
Volker_E edited projects, added OOUI; removed OOUI (OOjs-UI-0.19.5).