Implement UI for automatically updating lists. #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This implements the UI for saving and loading auto-updating lists. It adds radio buttons to select if a list is auto-updating (now the default), or manually updated. If a list is manually updated, the functionality remains the same as it was prior to this PR. If the list is auto-updating, the list of selected entries to the right of the search results becomes hidden, and the buttons in the search results that are used to manually add entries to the list are removed. The search results become a read-only sample of what the list will contain.
To improve the UX, search results are now automatically updated as search filters are added and removed, and the Search button has been removed. Hopefully this won't overtax the CM, but it can be changed back if it does.
When a list is retrieved from the CM, it may contain a saved search query, which is now loaded into the advanced search builder when the list is opened. A saved search query is automatically executed when a list is opened.
Since the search parameters can now be saved, they now are considered in the calculation of whether or not a list is valid, and whether it has been modified, which they were not previously. They also are now affected by the cancel changes function, which they were not previously. In order to implement this, the search parameters are now stored in the Redux store with a baseline (last saved) state and a current state, similar to other list properties.
This PR also makes a correction to the back-end field name for Distributor search, which was wrong before.
There are a couple of remaining issues to work out:
Video:
autolist.mov
Motivation and Context
This feature has been requested by libraries, to make it easier to maintain lists.
Notion: https://www.notion.so/lyrasis/Admin-UI-Automatically-add-new-titles-to-list-when-they-match-search-parameters-b86ceeffe55d4628b822e661eb992544
How Has This Been Tested?
Unit tests are included that cover a lot of the functionality.
Checklist: