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

Hook up saved search APIs. #1368

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

richardxia
Copy link
Member

This hooks up the placeholder locations in the Navigator UI with the saved search APIs.

When a user is logged in, we add a "Save Results" button to the search results page, and pressing that button will fire an API request to save the current search filters and query to the database. This involved pulling out the pieces of the search state object that Algolia's InstantSearch API manages into the format our API accepts.

On the main dashboard page, we perform the reverse operation, querying our API for saved searches, and then reconstituting a simulacrum of the serach state object, solely for the purposes of generating the URL query parameters directly from that object, which is how the search results page normally works.

Since I made some small UI changes, here's a screenshot showing what the "Save Results" button looks like:

Screenshot 2024-06-27 at 9 03 59 AM

This hooks up the placeholder locations in the Navigator UI with the
saved search APIs.

When a user is logged in, we add a "Save Results" button to the search
results page, and pressing that button will fire an API request to save
the current search filters and query to the database. This involved
pulling out the pieces of the search state object that Algolia's
InstantSearch API manages into the format our API accepts.

On the main dashboard page, we perform the reverse operation, querying
our API for saved searches, and then reconstituting a simulacrum of the
serach state object, solely for the purposes of generating the URL query
parameters directly from that object, which is how the search results
page normally works.
@richardxia richardxia merged commit e2f8786 into master Jun 27, 2024
5 checks passed
@richardxia richardxia deleted the 1349-hook-up-navigator-ui-to-saved-search-api branch June 27, 2024 16:17
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.

Connect Bookmarks, Saved Searches, and all other applicable features to API
1 participant