Page MenuHomePhabricator

Support an 'indeterminate' state for checkboxes
Closed, ResolvedPublic

Description

As described in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes, this feature has been supported in browsers since time immemorial (aka IE6): https://www.caniuse.com/#feat=indeterminate-checkbox

The state is rendered on different platforms as either a hyphen image.png (18×19 px, 493 B) (my preference) or a square image.png (19×19 px, 349 B).

The current patch in GlobalPreferences proposes a square: image.png (29×25 px, 238 B) (https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/GlobalPreferences/+/459533/)

A hyphen would look something like this: image.png (29×25 px, 236 B)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 498115 had a related patch set uploaded (by Esanders; owner: Esanders):
[oojs/ui@master] CheckboxInputWidget: Add support for indeterminate state

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

Do I understand the state correctly, that this should be applied for example to the first checkbox here?

image.png (1×1 px, 181 KB)

Volker_E triaged this task as Medium priority.Mar 25 2019, 4:03 AM

Yes, but only when some but not all of the checkboxes below are selected. From Bartosz's original commit:

  • The parent checkbox is checked if all of its children are checked
  • The parent checkbox is unchecked if all of its children are unchecked
  • The parent checkbox is indeterminate if some of its children are checked and some are unchecked

Change 498115 merged by jenkins-bot:
[oojs/ui@master] CheckboxInputWidget: Add support for indeterminate state

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

Volker_E assigned this task to Esanders.
Volker_E moved this task from Reviewing to OOUI-0.31.2 on the OOUI board.
Volker_E edited projects, added OOUI (OOUI-0.31.2); removed OOUI.
Volker_E removed a project: Patch-For-Review.

Change 499353 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Update OOUI to v0.31.2

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

Change 499353 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.31.2

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

Jdforrester-WMF subscribed.

This patch landed in MediaWiki master in time for 1.33.0-wmf.24, which will go out to Wikimedia production from 2019-04-02.

Note: 'indeterminate' has been reflected in latest update to Style Guide https://github.com/wikimedia/WikimediaUI-Style-Guide/pull/268 – it's now available in Components overview Sketch file and SVG and will be available at https://design.wikimedia.org/style-guide/components/checkboxes.html once T235677 is resolved.