* [feat] Documents, images and users bulk actions now work with custom models as well
* [fix] Bulk move disables invalid parent pages in the page chooser modal
* [refactor] Make the code DRY
Co-authored-by: Shohan <shohanduttaroy99@gmail.com>
* [feat] Add feature to customize behavior of select all objects in listing
* [feat] Select all in listing now works with search terms
* [refactor] Make the code DRY
* [feat] Bulk action class now accepts a list of models
* [feat] Add list of models to each bulk action
* [refactor] Remove individual listing dispatcher views
* [refactor] Introduce new hook for registering action classes
* [refactor] Add single dispatcher view for all bulk actions, and modify tag used to fetch bulk actions for ui
* [refactor] Transfer bulk action files to a directory
* [feat] Add utility functions to retrieve bulk actions easily
* [refactor] Register actions in wagtail_hooks.py files
* [refactor] Fix linting errors
* [fix] Fix tests due to change in url of bulk actions
* [refactor] Change action registration for users listing
* [fix] Fix code for which tests were failing
* [feat] Raise exception if bulk action class is not derived from BulkAction
* [feat] Make single model in cls.models as default model
* [refactor] Change name of function to get bulk actions for a model
* [feat] Add classmethod to get default model in case of single element models list
* [feat] Add bulk action registry to keep track of bulk actions instead of looping over all of them each time
* [fix] Fix linting issue
* [feat] Initialise bulk action registry once and reuse that instance wherever required
* [refactor] get_bulk_actions_for_model now returns an iterator
* [refactor] Restructure the return value of 'get_actionable_objects'
* [refactor] Change code in move bulk action due to changes in base bulk action class
* [fix] Change tests due to changes in move bulk action
* [refactor] Apply changes to user bulk actions
* [fix] Fix tests due to changes in users bulk actions
* [feat] Remove object_key variable from BulkAction class
* [refactor] Change custom context keys used in all listings to generic ones
* [refactor] Refactor all bulk actions files to use items instead of objects for consistency
* [fix] Fix transform transition of action bar
* [refactor] Increase spacing in action bar, consistent with the designs
* [fix] Make button width fixed, with proper notes to accessibility
* [refactor] Decrease padding and border radius, remove borders from buttons, align action bar with titles
* [refactor] Remove border from more button and decrease font weight of button label
* [refactor] Use django's bulk updates and deletes instead of updating objects one by one
* [refactor] Declare form fields as class variables rather than in __init__ method
* [refactor] Refactor the pages bulk actions to work if called from a management command
* [refactor] Specify implicitly the variables required in execute_action
* [refactor] Return early if no tags are supplied
* [refactor] Add **kwargs to all overriden execute_action method for additional keyword arguments
* [refactor] Remove unnecessary use of class variables
* [feat] execute_action now returns the count of updated objects, to be used in success message
Fixed following
- The list of ids in bulk action view were converted to int before querying. This could have problems when the ids were not meant to be integers,
e.g. like in the case of EmailUser where it is a uuid. Django converts strings to integers when querying wherever applicable, so explicit
conversion was removed.
- Tests were failing because the order of the li elemeents were not as predicted. Checking for the li elements instead of the entire ul as a whole fixed that