Skip to content

DRYD-2113 Search > Pinned Queries#356

Open
spirosdi wants to merge 10 commits into
developfrom
feature/dryd-2113
Open

DRYD-2113 Search > Pinned Queries#356
spirosdi wants to merge 10 commits into
developfrom
feature/dryd-2113

Conversation

@spirosdi

Copy link
Copy Markdown
Contributor

What does this do?
It adds the Pinned Queries feature to the Advanced Search page. There are two buttons added in the top button bar:

  • Pin button that opens a modal to pin a query with a name and a description
  • Pinned Queries button that opens a modal with a table holding pinned queries (name, type, description, delete). Clicking a row executes the query by populating the search form. User can also delete a query
    Changes:
  • Storing pinned queries in state.prefs.pinneQueries, reusing the existing prefs localStorage mechanism.
  • Adding new action codes PIN_QUERY, DELETE_PINNED_QUERY, actions pinQuery, deletePinnedQuery, loadPinnedQuery, and selector getPinnedQueries. Extending reducer cases. A pinned query contains the whole form state (keyword, record type, vocabulary, and the advanced conditions) so loading restores the form exactly.
  • The actions call savePrefs() so changes persist immediately.
  • Adding new components: SearchPinButton, PinnedQueriesButton, PinQueryModal, PinnedQueriesModal

Why are we doing this? (with JIRA link)
Users have asked for the ability to save advanced search query parameters and re-run them later. https://collectionspace.atlassian.net/browse/DRYD-2113

How should this be tested? Do these changes have associated tests?
Unit tests were added.

For manual testing:

  1. Start the local cspace-ui devserver, log in, and go to the Advanced Search page (new search form).
  2. Build a query (record type + keyword and/or conditions), click Pin, give it a name and description, and pin it.
  3. Click Pinned Queries, confirm it appears in the table. Reload the page (and re-login) and confirm it persists.
  4. Change the record type / clear the form, then click the pinned row (or focus it and press Enter), confirm the URL switches and the form repopulates, and that running the search returns the expected results.
  5. Pin again under the same name, confirm it updates rather than duplicating. Delete with the inline confirm and confirm it is removed and stays removed after reload.
  6. Confirm the Pin / Pinned Queries buttons appear only in the top button bar and only on the new search form.

Dependencies for merging? Releasing to production?
No dependencies. Only a left TODO, we need to add the link to the user manual in the pinned queries modal.

Has the application documentation been updated for these changes?
Changelog has been updated

Did someone actually run this code to verify it works?
@spirosdi ran it locally.

Have any new accessibility violations been handled?
Changes have been checked with the WAVE browser extension and all issues have been handled.

@spirosdi spirosdi requested a review from mikejritter June 16, 2026 08:24
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.

1 participant