Skip to content

feat(options-list): add a select-all header checkbox#119

Merged
mt8 merged 1 commit intomainfrom
feature/118-select-all-checkbox
Apr 17, 2026
Merged

feat(options-list): add a select-all header checkbox#119
mt8 merged 1 commit intomainfrom
feature/118-select-all-checkbox

Conversation

@mt8
Copy link
Copy Markdown
Owner

@mt8 mt8 commented Apr 17, 2026

Summary

  • Add a tri-state header checkbox to the Options table that selects/deselects every non-protected visible row in one click. Indeterminate state kicks in when some (but not all) selectable rows are selected.
  • WordPress-Core accessor rows stay unselectable — the header toggle never flips them.
  • Japanese translation shipped ("このページのすべてのオプションを選択").

Closes #118

Implementation note

The header uses a native `<input type="checkbox">` with a ref so the `indeterminate` DOM property can be flipped from `useEffect`. `@wordpress/components` `CheckboxControl` does not expose that property.

Test plan

  • Click the header checkbox → every non-protected visible row flips to selected; the bulk-action buttons enable.
  • Individually deselect one row → header becomes indeterminate.
  • Click again from indeterminate or fully-checked state → all selectable rows deselected.
  • Protected (WordPress-Core) rows never toggle via the header.
  • Japanese locale renders the aria-label translation.
  • CI green.

Running bulk actions (quarantine / export / delete) against every visible
row took one click per row — tedious on a 50-row page. Add a header
checkbox that toggles selection for every non-protected visible row with
tri-state behavior:

- Empty    → nothing selected on the current page.
- Checked  → every selectable visible row is selected.
- Indeterminate → some but not all selectable rows are selected.

WordPress-Core accessor rows stay unselectable (they already cannot be
individually toggled), so the header checkbox never flips them either.

The header control uses a native <input type="checkbox"> instead of
WordPress' CheckboxControl because only the native element exposes the
`indeterminate` DOM property, which we set through a ref.

Japanese translation shipped; JSON chunks regenerated.

Closes #118
@mt8 mt8 merged commit 8f73bd4 into main Apr 17, 2026
8 checks passed
@mt8 mt8 deleted the feature/118-select-all-checkbox branch April 17, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Options list: add a header checkbox to select/deselect all visible rows

1 participant