projectblacklight / arclight

A Rails engine supporting discovery of archival material
https://samvera.atlassian.net/wiki/spaces/samvera/pages/405211890/ArcLight
Other
39 stars 24 forks source link

Make Grouped by Collection the default view of cross-collection search results #1488

Open seanaery opened 10 months ago

seanaery commented 10 months ago

Current Behavior

Any search from anywhere in ArcLight leads to a search results page in the flat All Results view. A user can toggle over to Grouped by Collection view.

Desired Behavior:

The Grouped by Collection view should be the default view of search results. However, the flat All Results view should be automatically applied if the query was specifically a within-collection search, e.g., a user has done a search from a collection or component page and their search scope is This Collection rather than All Collections.

It may also be useful to make this a configurable setting, especially to support any implementers who are using ArcLight for only a single collection, or who have a preference for keeping things ungrouped.

Rationale

As established in the Dec 2023 community sprint, the vast majority of current ArcLight implementers (using any version) have either already implemented or plan to implement custom local workarounds to get cross-collection results grouped by default.

Potential Solutions

Some implementers have already developed a workaround here for a 1.x-based application, so an approach for core may be informed by these implementations. Note that solutions for 1.x will be much different from any solutions for 0.x, especially given changes in how 1.x uses javascript and ViewComponents.

barmintor commented 10 months ago

Columbia's actual commit . It would not be difficult to examine the params for a collection filter before defaulting.

I would note that after doing this we got feedback that the resulting display was a little confusing if the collection was itself one of the grouped resources, so there's more complicated logic in a local grouped results component.

gwiedeman commented 10 months ago

Seconding removing collection level results from this view along the lines of Columbia's more complex implementation. It is confusion when the collection level link shows up in the current grouped display.

crugas commented 8 months ago

Thirding this proposal as outlined by Duke and Columbia, especially if it's possible to make this a configurable setting as opposed to hard-coding it as a default.

senyzspalding commented 7 months ago

I vote for this as well. At this moment I am working on an update and just made the small changes to catalog_controller.rb but it would be nice to configure option or make it the default