-
-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI for bulk deleting projects #4404
UI for bulk deleting projects #4404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I only encountered one problem in testing: when I select an individual project and delete it, the project count immediately changes to reflect it. But when I bulk delete multiple projects, the project count stays the same until I perform another action.
Video here: https://www.loom.com/share/18bbf2c24a2444f0b0750353ff90a4be
)} | ||
</p> | ||
|
||
<Checkbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not at all blocking, since it's an upstream issue, but the Checkbox component should probably have a focus state. When tab-navigating, you can't tell which the checkbox is the currently selected element. Would be a small accessibility improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a small commit that adds focus styles for these :)
if (!response.ok) { | ||
throw response; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhh, fetch()
error handling 😁
# Conflicts: # jsapp/js/projects/myProjectsRoute.tsx
I pushed a hacky fix for that. I left a comment explaining the hack in new code. The old code is a code we definitely aim to remove completely, so I didn't go into much detail in there |
Description
When multiple projects are selected there is an option to delete them all.
Code review notes
Things of interest here:
api.ts
to throw an error when call fails (or response is not positive)KoboPrompt
ProjectBulkActions
that will hold all bulk action buttons (we start with just "Delete")BulkDeletePrompt
component for displaying a prompt with checkboxes that needs to be checked before confirming projects deletionRelated issues
Fixes #4376