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

Add a way to filter facets in the facets "more" modal #3367

Merged
merged 4 commits into from
Oct 16, 2024
Merged

Conversation

sandbergja
Copy link
Contributor

Closes #2123

This adds an input that allows the user to type a fragment of the facet value that interests them. The facet values are filtered to match only this filter using Solr's facet.contains (thanks @magibney for pointing that out), as illustrated in the gif below.

when a user clicks more on a facet in the sidebar, it shows a filterable interface where they can select facet values that match a particular string

Thank you to @christinach and @ishasinha1 for your collaboration. Thanks in advance for your feedback!

This creates a new endpoint at /catalog/facet/<facet_name>/<query_fragment>

Co-authored-by: Isha Sinha <[email protected]>
@jrochkind
Copy link
Member

Wow, this is a feature people have wanted for a while -- I was never able to figure out a way to do it, perhaps I was looking before facet.contains existed! This is incredible work -- sure took touching a lot of files!

Copy link
Member

@jcoyne jcoyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This looks great.

Rather than two very similar controller actions for facets vs. facet_suggest,
this commit combines them into a single controller action.
@sandbergja sandbergja requested a review from jrochkind October 16, 2024 14:59
@sandbergja sandbergja merged commit 98a077f into main Oct 16, 2024
11 checks passed
@sandbergja sandbergja deleted the facet-typeahead branch October 16, 2024 16:49
sandbergja added a commit that referenced this pull request Oct 17, 2024
* Facet typeahead: back end

This creates a new endpoint at /catalog/facet/<facet_name>/<query_fragment>

Co-authored-by: Isha Sinha <[email protected]>

* Facet typeahead: front end

Co-authored-by: Christina Chortaria <[email protected]>

* bundle exec i18n-tasks add-missing

* Incorporate feedback from review

Rather than two very similar controller actions for facets vs. facet_suggest,
this commit combines them into a single controller action.

---------

Co-authored-by: Isha Sinha <[email protected]>
Co-authored-by: Christina Chortaria <[email protected]>
sandbergja added a commit that referenced this pull request Oct 21, 2024
* Facet typeahead: back end

This creates a new endpoint at /catalog/facet/<facet_name>/<query_fragment>

Co-authored-by: Isha Sinha <[email protected]>

* Facet typeahead: front end

Co-authored-by: Christina Chortaria <[email protected]>

* bundle exec i18n-tasks add-missing

* Incorporate feedback from review

Rather than two very similar controller actions for facets vs. facet_suggest,
this commit combines them into a single controller action.

---------

Co-authored-by: Isha Sinha <[email protected]>
Co-authored-by: Christina Chortaria <[email protected]>
sandbergja added a commit that referenced this pull request Oct 22, 2024
* Facet typeahead: back end

This creates a new endpoint at /catalog/facet/<facet_name>/<query_fragment>

Co-authored-by: Isha Sinha <[email protected]>

* Facet typeahead: front end

Co-authored-by: Christina Chortaria <[email protected]>

* bundle exec i18n-tasks add-missing

* Incorporate feedback from review

Rather than two very similar controller actions for facets vs. facet_suggest,
this commit combines them into a single controller action.

---------

Co-authored-by: Isha Sinha <[email protected]>
Co-authored-by: Christina Chortaria <[email protected]>
maxkadel added a commit that referenced this pull request Dec 17, 2024
…t-to-8

Backport #3367 to 8.x (Add a way to filter facets in the facets "more" modal)
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.

Improve facet-modal navigation
3 participants