Skip to content

Draft: Move the Delete all button to actions

Erwan Rouchet requested to merge delete-action into master

Closes #639 (closed)

This includes a refactoring of the HeaderActions tests to remove duplicate code and get better assertion error messages with long line-by-line diffs. It turns out adding an action does not cause any of the tests to fail, because a for loop was iterating over the expected actions and not the actual actions, so it would stop before getting to the newer actions. This caused the existing Manifest action to not be included in any the assertions despite it being there.

The Delete all button was located in ElementList.vue, which has access to the filters provided by ElementsFilters. This new deletion action no longer has access to the filters, currently making it impossible to give the filters to navigation/deleteInCorpus or navigation/deleteInElement. I am considering moving the filters object to the store, adding mutations and getters to get/set the route query params and get the API filter parameters, and maybe also automatically refresh the navigation. This can remove quite a bit of code from ElementsFilters and will make triggering the deletion, as well as checking for the best class filter (which is unsupported in deletions), much easier.

Edited by Erwan Rouchet

Merge request reports

Loading