This PR implements the "Delete Task" functionality, which deletes Tasks from an existing Page. Prior to this PR, you only had the "Delete Page/Step" functionality.
New Behaviour:
Tasks in the "Edit Page/Step" modal should now have a "Delete Task" button (trashcan icon).
Clicking on the button will prompt users to confirm if they want to delete the task.
If this is the only task in a page/step, additional information will be given.
Confirming the action will result in the Task being deleted.
Cancelling will result in no action.
If the only task in a page/step is deleted, the page/step will also be deleted. The Edit Page/Step modal will then close.
⚠️ Important Behind-The-Scenes Bit:
cleanupTasksAndSteps() now properly removes Steps/Pages that have 0 Tasks, and removes Tasks that aren't associated with any Page/Step.
coverage: 56.977%. remained the same
when pulling 22dcb1540ae5ec9ffdbd7a781be695d2ee9ed5bd on pages-editor-pt19
into a82d2f148d791a762c9aab145b139145923c8553 on master.
PR Overview
Part of: Pages Editor MVP project and FEM Lab super-project Follows #7065 Staging branch URL: https://pr-7075.pfe-preview.zooniverse.org/lab/1982/workflows/editor/3711?env=staging
This PR implements the "Delete Task" functionality, which deletes Tasks from an existing Page. Prior to this PR, you only had the "Delete Page/Step" functionality.
New Behaviour:
⚠️ Important Behind-The-Scenes Bit:
cleanupTasksAndSteps()
now properly removes Steps/Pages that have 0 Tasks, and removes Tasks that aren't associated with any Page/Step.Testing Steps
Status
Ready for review!