Give selection a visible boundary
Imagine a Budapest watch-repair workshop preparing completed jobs for collection. In a test list, 87 jobs match the filter, with 24 on the first page. Label the header checkbox Select 24 jobs on this page. After activation, show 24 selected and offer a separate, deliberate Select all 87 matching jobs action if needed.
Let staff open a selection view listing job references and recognisable details, including selections on other pages. A count alone cannot reveal the wrong customer or an omitted job. Selecting boxes must not change a job's stage; provide a separately named Mark ready for collection command.
Make the checkbox state meaningful
W3C's checkbox pattern uses a mixed state when some members of a group are selected. For this page, deselecting one of its 24 jobs should produce a partial header state and 23 selected. Define what activating that partial header does, such as selecting the remaining job.
MDN distinguishes a checkbox's indeterminate appearance from its checked value. Developers must track the actual selected records, not infer them from the header's appearance. Give each row a label identifying its job, and test keyboard selection with Space. A partial selection indicator must not stand for a partly completed save.
Keep selection predictable while browsing
For this workshop, retain selected job identities when changing pages or sorting, and keep the total visible. Choose an explicit filter-change rule: clearing the selection reduces hidden carry-over, while retaining it supports assembling a set across searches but needs a persistent selection view. Tell staff which rule applies before they change filters.
For Select all matching jobs, specify whether membership is fixed when selected or recalculated later. A fixed set is easier to review: a newly matching 88th job does not silently join it. This fixes identities, not field values. Changed or unavailable jobs still need server checks before saving; never silently replace them with other matches.
Connect the chosen set to the result
Before applying the action, show its name, target count and an inspectable target list. Keep removed selections excluded. Provide Clear selection and cancellation without changing records. The server must check permission and whether each requested change is still allowed.
Agree whether one failure blocks all changes or produces individual outcomes. Firestore batched writes are atomic for the writes included in that batch; this does not cover separate customer messages. If individual results are used, identify successes and failures, and let staff review failed jobs before retrying instead of repeating successful changes.
Approve selection with known test jobs
Ask staff to demonstrate these cases using named test records. Check the stored changes as well as the selection display.
- Select a page, then all matching jobs; verify the different counts and identities.
- Deselect one job and confirm that it stays excluded from the final action.
- Change pages, sorting and filters; check the declared retention or clearing rule.
- Add a new matching job after selection; verify the agreed membership rule.
- Use keyboard selection, inspect hidden selections, then clear or cancel without changes.
- Make one job unavailable; check the recorded outcome before any retry.