From 98d38278024ad29ed5308770c0e7237bae12bc36 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Tue, 22 Oct 2024 07:31:10 -0700 Subject: [PATCH] Forward-port improvements to the facet suggest feature Thanks to @cbeer and @maxkadel for identifying these issues while backporting this feature to release-8.x! * Provide the option to opt out of this feature (in 8.x, it is opt-in). You can add suggest: false to your facet config in the catalog controller if you don't want to use it for a particular field. * Use text_field_tag * Correct typo in debounce.js * Run i18n-tasks translate-missing, rather than add-missing. This pulls preliminary translations from the Google Cloud Translate API. * Remove redundant assignment * Remove unnecessary assignment Co-authored-by: Chris Beer Co-authored-by: Max Kadel --- .../search/facet_suggest_input.html.erb | 14 ++++++------- .../blacklight/search/facet_suggest_input.rb | 4 ++++ .../concerns/blacklight/catalog.rb | 5 ++--- .../blacklight-frontend/debounce.js | 2 +- config/locales/blacklight.ar.yml | 4 ++-- config/locales/blacklight.es.yml | 4 ++-- config/locales/blacklight.fr.yml | 4 ++-- config/locales/blacklight.hu.yml | 4 ++-- config/locales/blacklight.it.yml | 4 ++-- config/locales/blacklight.nl.yml | 2 +- config/locales/blacklight.pt-BR.yml | 4 ++-- config/locales/blacklight.sq.yml | 4 ++-- config/locales/blacklight.zh.yml | 4 ++-- .../search/facet_suggest_input_spec.rb | 21 +++++++++++++++++-- spec/features/facets_spec.rb | 13 ++++++++++++ 15 files changed, 63 insertions(+), 30 deletions(-) diff --git a/app/components/blacklight/search/facet_suggest_input.html.erb b/app/components/blacklight/search/facet_suggest_input.html.erb index a947961186..80e4e2f037 100644 --- a/app/components/blacklight/search/facet_suggest_input.html.erb +++ b/app/components/blacklight/search/facet_suggest_input.html.erb @@ -1,9 +1,9 @@ -