Skip to content
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

Save search parameters with auto-updating lists. #39

Merged
merged 4 commits into from
Sep 1, 2022
Merged

Conversation

ray-lee
Copy link
Contributor

@ray-lee ray-lee commented Aug 25, 2022

Description

This sends the media type and sort order parameters when saving auto updating lists. Previously, only the advanced search query was sent.

Motivation and Context

This allows the CM to exactly reproduce the search that was configured by the user when editing a list in the admin UI. In the UI, the user is able to select a media type (all, book, audio) and a sort order (relevance, title, author), in addition to an advanced search query. These all affect the search results. (Somewhat non-intuitively, setting the sort order to title or author changes the search results, because a relevance cut-off is automatically applied.)

This finishes off https://www.notion.so/lyrasis/Admin-UI-Automatically-add-new-titles-to-list-when-they-match-search-parameters-b86ceeffe55d4628b822e661eb992544. (There is some discussion of this in the comments of that ticket).

How Has This Been Tested?

  • Create or edit a list, with auto update set to true.
  • Select values for the Search For and Sort By fields in the Search for Titles section.
  • Save the list. The selected values should be retained after save.
  • Reload the page in the browser. The selected values should be retained after reload.
  • Repeat with various combinations of values of Search For and Sort By.

Checklist:

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@ray-lee ray-lee marked this pull request as ready for review August 25, 2022 22:37
@ray-lee ray-lee requested a review from a team August 25, 2022 22:37
Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🏆

Really nice to see these tests where the method being tested takes state as an argument.

@ray-lee ray-lee merged commit b68a32b into main Sep 1, 2022
@ray-lee ray-lee deleted the save-search-params branch September 1, 2022 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants