Skip to content

Multi-select rows with bulk delete and set-property actions in Table - #1240

Draft
joepio wants to merge 2 commits into
developfrom
cursor/table-bulk-actions-dc4c
Draft

Multi-select rows with bulk delete and set-property actions in Table#1240
joepio wants to merge 2 commits into
developfrom
cursor/table-bulk-actions-dc4c

Conversation

@joepio

@joepio joepio commented Aug 1, 2026

Copy link
Copy Markdown
Member

Related Issues

Adds a multi-edit mode with bulk actions to the Table view.

What this adds

  • Per-row selection: a checkbox to the left of the "open resource" button in each row's index cell. It shows on hover/focus and stays visible while its row is checked.
  • Select all: a checkbox in the index-column header. It selects/deselects every row matching the current filter (all pages, via collection.getAllMembers()), and renders indeterminate when only some rows are selected.
  • Bulk actions bar above the grid (writers only, shown once at least one row is selected):
    • Set property — pick one of the view's columns and a value (reusing the normal per-datatype InputSwitcher), then write it to every selected row.
    • Delete — deletes all selected rows behind a confirmation dialog.
    • Clear — clears the selection.

Selection is keyed by subject (not grid index) so it survives sorting, filtering, paging and deletion, and it is cleared when the query (filter/sort/view) changes. Session/new (_new:) rows are not selectable. Both bulk operations push undo entries onto the table history stack.

Implementation notes

  • The generic grid (TableEditor) stays feature-agnostic: FancyTable gained optional renderRowSelector / headerSelector slots, IndexCell renders an optional selector, and TableHeader renders an optional header selector. The index column only widens (via useCellSizes) when selection is enabled, so read-only/other tables are unaffected.
  • New files under chunks/TablePage/: useRowSelection.ts (selection state), RowSelectCheckbox.tsx (per-row checkbox that resolves its own subject), TableBulkActionsBar.tsx, and TableSetPropertyDialog.tsx.
  • Bulk writes mirror the existing clear-cells/delete-row helpers (resource.set + save, resource.destroy) and reuse ConfirmationDialog.

Verification

  • New Playwright e2e in browser/e2e/tests/table-bulk-actions.spec.ts (both pass locally, 2/2):
    • select individual rows and bulk delete — selects two rows via their checkboxes, deletes them via the bulk bar + confirmation, asserts they're gone and the untouched row remains.
    • select all and bulk set a property — uses the header select-all, sets the name property to "Done" across all rows, asserts all rows updated.
    • Interactive elements got stable data-testids (row-select-checkbox, select-all-checkbox, table-bulk-actions, bulk-set-property-button, bulk-delete-button, bulk-clear-button, bulk-set-property-select) so the tests don't depend on i18n-wrapped label text.
  • pnpm --filter @tomic/data-browser typecheck / @tomic/e2e typecheck — no new errors (only a pre-existing pairing.test.ts node-types error unrelated to this change).
  • lint passes (warnings only), formatting clean.
  • Manual end-to-end browser test (demo below): created a "Tasks" table with 5 rows, selected individual rows, bulk Set property (name → "Done" on 2 rows, toast "Updated 2 rows"), Select all from the header (5 rows selected), and bulk Delete with confirmation (toast "Deleted 5 rows", empty table). No errors.

table_bulk_actions_demo.mp4

Row selection + select-all + bulk bar (rows 1–2 already set to "Done"):

Bulk selection and set property

Bulk delete confirmation:

Bulk delete confirmation

Note: localization catalogs (src/locales/*.po) were intentionally not regenerated in this PR to avoid committing unrelated extraction churn; new English strings render via source fallback and are picked up by the project's normal wuchale extraction step (run during the build), which is how the demo labels above were produced. The e2e tests select by data-testid, so they pass regardless of extraction state.

Checklist

  • Add changelog entry linking to issue, describe API changes
  • Add or update tests if needed
  • Update docs if needed

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 1, 2026 10:08
Co-authored-by: Joep Meindertsma <joep@ontola.io>
Co-authored-by: Joep Meindertsma <joep@ontola.io>
Base automatically changed from tables-and-dashboards to develop August 1, 2026 14:26
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.

2 participants