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

Default behavior of Advanced Search facet modal does not reflect expected multi-select behavior #3236

Open
body-clock opened this issue Jul 26, 2024 · 3 comments

Comments

@body-clock
Copy link
Member

body-clock commented Jul 26, 2024

On the advanced search page, we render facets for the user to refine their search. These facet fields, unlike facet fields on basic search, allow for multi-select. When facets are limited (which they are by default), we are presented with a popup modal containing the remaining facet values that exist beyond the default limit. This works well for basic search, since only one value can be selected per-search. More can be applied, but a search is performed on every click.

On the advanced search page, this modal has the same behavior which stands in opposition to the modified facet multi-select behavior. In SearchWorks, this issue is avoided by using additional Solr params to unlimit facet values specifically on the advanced search form (this additional configuration is enabled by the use of an additional search builder step provided by the blacklight_advanced_search gem).

The clearest path forward is to modify the additional facet modal to support multi-select and disable the default search-on-click behavior. This can be achieved by creating an additional component, much like the FacetFieldCheckboxesComponent. This modification would greatly improve the default behavior of limited facet fields on the advanced search page.

@body-clock
Copy link
Member Author

Screenshot 2024-08-12 at 10 09 17 AM

I was able to integrate a JS multiselect (I chose Tom Select because of its nice Bootstrap 5 theme) on the advanced search page. I could do a writeup or make a wiki page for this if anyone is interested.

@jcoyne
Copy link
Member

jcoyne commented Aug 12, 2024

@body-clock That's very nicely done. Writing that up as a wiki page would be excellent!

@body-clock
Copy link
Member Author

Sorry this took me so long - I wrote up a wiki page that details my implementation here.

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

No branches or pull requests

2 participants