Bulk-toggle review follow-ups for the sbpp#1436 Select all / Select none
buttons on the web-group permission flag grid.
- Arm the master-detail dirty tracker. `SbppGroupsToggleAllFlags` set
`input.checked` from script, which fires no `change` event, so the
form-level `markDirty` listener never ran. A left-rail click after a
bulk toggle therefore repainted the pane and silently dropped the
operator's change instead of raising the "Unsaved changes" confirm --
a data-loss path a manual checkbox click does not have. The helper now
dispatches one bubbling `change` from the grid, and short-circuits when
nothing actually changed so a no-op press does not arm the guard.
- Give both buttons an `aria-label` so the accessible name says which
list "Select all" applies to.
- Harden the spec: the expected bitmask is now recomputed in-spec from
`data-flag-value` with non-bitwise arithmetic (an independent oracle
instead of the page's own fold), asserted exactly rather than as
"not 0", and re-asserted after the Save + reload round-trip with every
checkbox verified -- select-all sets bit 31, so this is the sbpp#1272
unsigned-fold path. Adds `type="button"` assertions, an idempotency
press, and a second test covering the unsaved-changes guard.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
What
Ports upstream issue sbpp#1436 to this fork.
On Group Management -> Web admin groups, the permission flag grid
had no bulk control, so operators had to tick every flag individually.
This adds two ghost buttons next to the Permission flags label in
the groups-list master-detail editor:
flags[]checkboxBoth refresh the live bitmask preview (
SbppFoldFlags), and the foldedOR-sum round-trips through Save exactly like a manual toggle. The
buttons are gated on
permission_editgroup, matching the checkboxesthemselves, and disabled checkboxes are left untouched.
Changes
web/themes/default/page_admin_groups_list.tpl— buttons + a smallSbppGroupsToggleAllFlags(checked)helper.web/tests/e2e/specs/flows/admin-groups-select-all-flags.spec.ts—new flow spec covering select-all, save round-trip, and select-none.
Notes
Fork's current code already handled the unsigned-bitmask concern
(sbpp#1272); this change is purely additive UI. No SourcePawn changes; no
local SP compiler, relying on CI.
🤖 Generated with Claude Code