Skip to content

Conversation

@mikejritter
Copy link
Contributor

@mikejritter mikejritter commented Jan 15, 2026

What does this do?

  • Adds redux handlers for storing the preferred view
  • Store the preferred view when toggling search results

Why are we doing this? (with JIRA link)
Jira: https://collectionspace.atlassian.net/browse/DRYD-2000

This is functionality that we wanted for the new search result views which had not yet been added.

How should this be tested? Do these changes have associated tests?

  • Start the devserver
  • Run a query on Objects
    • The preferred view should not yet be initialized and should default to the table
  • Switch to either the grid or detail list views
  • Navigate off of the search page
  • Run another query on Objects
  • See that you're presented with the last view you were on

Dependencies for merging? Releasing to production?
Tests for the redux actions/reducers?

The new pref is also saved in the browser's local storage. Might be worth a quick discussion to see if that's something we want.

Has the application documentation been updated for these changes?
N/A

Did someone actually run this code to verify it works?
@mikejritter tested using https://core.dev.collectionspace.org as a backend.

@mikejritter mikejritter requested a review from spirosdi January 15, 2026 22:30
Copy link

@spirosdi spirosdi 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. I am fine with storing the info in prefs and make it persistent. It would be a problem if we were showing the additional views for more record types, other than Collection Objects. Then it would make sense to not show always the same view, at least when user switches record types. But since we show them only for Collection Objects, is fine for me.

It makes sense to add redux unit tests, but it is something we can do later on too.

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