ux(users): surface bulk-actions toolbar (delete + add-to-group) - #977
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
…#974 Render a bulk-actions toolbar inside the Users fieldset that becomes visible when one or more user rows are checked and hides again when the selection is cleared. The toolbar contains: - a selection counter ("N users selected") - a Delete selected button wired to the existing bulkDeleteUsers() - an "Add to group..." select populated with available groups, wired to the existing bulkAddToGroup(); resets to the placeholder after each operation completes Implementation notes: - toolbar HTML added to frontend/src/index.html (id=bulk-actions-bar, hidden class by default; matches the idiom already used by updateBulkActionsBar in userList.ts) - populateBulkGroupSelect() added to userList.ts (alongside updateBulkActionsBar) and called by loadUsers() so options stay in sync after every refresh - handlers.ts wires the bulk-group-select change event and calls populateBulkGroupSelect() at setup time - bulk-change-role button intentionally absent (removed in PR #912) - 8 new tests covering: toolbar hidden/shown/count on selection changes, unchecking all hides toolbar, delete btn calls API, select populates with groups, select change calls bulkAddToGroup, placeholder selection is a no-op
a2c8b6d to
7ebcb28
Compare
|
Rebased on feat/multicloud-web-frontend. Resolved conflict in frontend/src/users/handlers.ts (additive: kept base's removal of bulkChangeRole import, added populateBulkGroupSelect import from this PR). |
|
pr-iterate: CR appears to be blocked by org-level usage limits; this PR is otherwise progressing (rebase complete, mergeStateStatus=UNSTABLE with CI pending). Re-invoke |
Summary
#bulk-actions-bartoolbar toindex.htmlthat appears on first selection and hides when selection is cleared.bulkDeleteUsers()/bulkAddToGroup()functions.populateBulkGroupSelect()touserList.ts(called byloadUsers()) so the select stays in sync after every refresh.closes #974
Test plan
node_modules/.bin/jest --no-coverage)tsc --noEmit)webpack)