Page MenuHomePhabricator

Table: Update indeterminate behavior of "select all rows" checkbox
Closed, ResolvedPublic

Description

When row selection is enabled, there is a checkbox in the thead that enables users to select or deselect all rows at once. Currently this checkbox is only in the indeterminate state if the user first checks all rows, then unchecks a box. It does not show the indeterminate state if a user just checks a single box.

Instead, the "select all row" checkboxes should show the indeterminate state any time some rows but not all are checked. See the APG for an example. In the example below, the "select all rows" checkbox should be in the indeterminate state.

image.png (720×1 px, 102 KB)


Acceptance criteria

  • The logic for the "select all rows" checkbox is updated to show the indeterminate state any time some but not all rows are selected
  • Unit tests are updated accordingly

Notes
  • Checkbox inputs have two states: checked and unchecked.
  • Checkbox inputs have three visual states: checked, unchecked, and indeterminate. (Reference: CSS Tricks)
  • :indeterminate is a CSS psuedo-selector. It is not an HTML/DOM attribute. (Reference: MDN docs)

Event Timeline

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

Change #1032029 had a related patch set uploaded (by LWatson; author: LWatson):

[design/codex@main] Table: Update indeterminate behavior of "select all rows" checkbox

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

Change #1032029 merged by jenkins-bot:

[design/codex@main] Table: Update indeterminate behavior of "select all rows" checkbox

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

Design verification done. This works perfectly. No issues were found 💯

(Tested with macOS Sonoma 14.3 on Chrome 125, Firefox 126 and Safari 17.3. AT: VoiceOver)

Change #1037103 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update Codex from v1.6.0 to v1.6.1

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/ce0a74a0e6/w

Change #1037103 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.6.0 to v1.6.1

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

Test wiki on Patch demo by ATomasevich (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/ce0a74a0e6/w/