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

Backport #3367 to 8.x (Add a way to filter facets in the facets "more" modal) #3369

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

sandbergja
Copy link
Contributor

Backport the "more" facet modal filter feature to the 8.x series (see #3367 for the 9.x version)

@sandbergja sandbergja force-pushed the backport-facet-suggest-to-8 branch from 46452d2 to 390d831 Compare October 21, 2024 22:05
@sandbergja sandbergja changed the title Add a way to filter facets in the facets "more" modal (#3367) Backport #3367 (Add a way to filter facets in the facets "more" modal) Oct 21, 2024
@sandbergja sandbergja marked this pull request as ready for review October 21, 2024 22:05
@sandbergja sandbergja changed the title Backport #3367 (Add a way to filter facets in the facets "more" modal) Backport #3367 to BL8 (Add a way to filter facets in the facets "more" modal) Oct 21, 2024
@sandbergja sandbergja changed the title Backport #3367 to BL8 (Add a way to filter facets in the facets "more" modal) Backport #3367 to 8.x (Add a way to filter facets in the facets "more" modal) Oct 21, 2024
@sandbergja sandbergja requested a review from cbeer October 22, 2024 16:40
sandbergja and others added 3 commits October 22, 2024 09:46
* 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 sandbergja force-pushed the backport-facet-suggest-to-8 branch 2 times, most recently from bc4e53b to efab330 Compare October 22, 2024 19:20
* Make this feature opt-in.  You can add suggest: true to your facet config in the catalog controller to start using it.
* Use text_field_tag
@sandbergja sandbergja force-pushed the backport-facet-suggest-to-8 branch from efab330 to 2d91574 Compare October 22, 2024 19:26
Copy link
Contributor

@maxkadel maxkadel left a comment

Choose a reason for hiding this comment

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

This looks awesome! Thank you @sandbergja!

My only hesitation is about the translations and what our expectations are around including language translations, or just making sure the "no translation" error doesn't render in any languages.

app/javascript/blacklight/debounce.js Outdated Show resolved Hide resolved
// const basicFunction = (entry) => console.log(entry)
// const debounced = debounce(basicFunction("I should only be called once"));
//
// debounced // does NOT print to the screen becase it is invoked again less than 200 milliseconds later
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@@ -111,6 +111,9 @@ ar:
sort:
count: ترتيب رقمي
index: ترتيب أبجدي
suggest:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it expected that these be in the target language? Or is it ok to start with English and then have a future edit with the real translation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. It looks like I used the add_missing task from i18n-tasks, when I should have used translate_missing, which grabs a preliminary translation from Google Translate.

sandbergja and others added 2 commits December 16, 2024 07:42
This pulls preliminary translations from the Google Cloud Translate API
@sandbergja sandbergja requested a review from maxkadel December 16, 2024 16:20
Copy link
Contributor

@maxkadel maxkadel left a comment

Choose a reason for hiding this comment

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

Thanks @sandbergja! Looks good! Happy to know about the "translate missing" task as well

@maxkadel maxkadel merged commit 2985a9b into release-8.x Dec 17, 2024
14 checks passed
@maxkadel maxkadel deleted the backport-facet-suggest-to-8 branch December 17, 2024 16:23
@seanaery
Copy link
Contributor

Thanks @sandbergja 💯 -- this is such a useful feature and I'm glad to see it'll be available in 8.x!

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.

4 participants