From 8567c4000a9236e72555a88f7ed5d09d806840db Mon Sep 17 00:00:00 2001 From: Guillermo Cacheda Date: Mon, 9 Oct 2023 12:24:00 +0200 Subject: [PATCH] feat: add fallback disclaimer for removing filters (#321) EMP-2097 --- src/components/desktop/desktop.vue | 4 +++- src/components/mobile/mobile.vue | 4 +++- .../search/fallback-disclaimer-message.vue | 13 ++++++++++++ src/components/search/index.ts | 2 ++ src/components/search/no-results-message.vue | 11 ++-------- src/components/search/spellcheck-message.vue | 8 ++------ src/i18n/messages.types.ts | 3 +++ src/i18n/messages/en.messages.json | 3 +++ src/i18n/messages/es.messages.json | 3 +++ src/i18n/messages/fr.messages.json | 3 +++ src/i18n/messages/it.messages.json | 3 +++ src/i18n/messages/pt.messages.json | 3 +++ src/tailwind/plugin-options.js | 20 ++++++++++++++++++- 13 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 src/components/search/fallback-disclaimer-message.vue diff --git a/src/components/desktop/desktop.vue b/src/components/desktop/desktop.vue index 765c9d07..966bde3a 100644 --- a/src/components/desktop/desktop.vue +++ b/src/components/desktop/desktop.vue @@ -10,6 +10,7 @@ + @@ -78,7 +79,8 @@ ScrollToTop, DesktopAside: () => import('../search').then(m => m.DesktopAside), NoResultsMessage: () => import('../search').then(m => m.NoResultsMessage), - SpellcheckMessage: () => import('../search').then(m => m.SpellcheckMessage) + SpellcheckMessage: () => import('../search').then(m => m.SpellcheckMessage), + FallbackDisclaimerMessage: () => import('../search').then(m => m.FallbackDisclaimerMessage) } }) export default class Desktop extends HasSearchedMixin { diff --git a/src/components/mobile/mobile.vue b/src/components/mobile/mobile.vue index 0ebefe66..8e1e13d4 100644 --- a/src/components/mobile/mobile.vue +++ b/src/components/mobile/mobile.vue @@ -25,6 +25,7 @@ + @@ -115,7 +116,8 @@ SearchBox, MobileAside: () => import('../search').then(m => m.MobileAside), NoResultsMessage: () => import('../search').then(m => m.NoResultsMessage), - SpellcheckMessage: () => import('../search').then(m => m.SpellcheckMessage) + SpellcheckMessage: () => import('../search').then(m => m.SpellcheckMessage), + FallbackDisclaimerMessage: () => import('../search').then(m => m.FallbackDisclaimerMessage) } }) export default class Mobile extends HasSearchedMixin { diff --git a/src/components/search/fallback-disclaimer-message.vue b/src/components/search/fallback-disclaimer-message.vue new file mode 100644 index 00000000..4c9ede68 --- /dev/null +++ b/src/components/search/fallback-disclaimer-message.vue @@ -0,0 +1,13 @@ + + + diff --git a/src/components/search/index.ts b/src/components/search/index.ts index 2140b9c9..0dfadef2 100644 --- a/src/components/search/index.ts +++ b/src/components/search/index.ts @@ -6,6 +6,7 @@ import SelectedFilters from './facets/selected-filters.vue'; import RelatedTags from './related-tags.vue'; import SpellcheckMessage from './spellcheck-message.vue'; import NoResultsMessage from './no-results-message.vue'; +import FallbackDisclaimerMessage from './fallback-disclaimer-message.vue'; import Redirection from './redirection.vue'; import DesktopAside from './desktop-aside.vue'; import MobileAside from './mobile-aside.vue'; @@ -17,6 +18,7 @@ export { RelatedTags, SpellcheckMessage, NoResultsMessage, + FallbackDisclaimerMessage, Results, PartialResults, Sort, diff --git a/src/components/search/no-results-message.vue b/src/components/search/no-results-message.vue index f3a68540..70257a3f 100644 --- a/src/components/search/no-results-message.vue +++ b/src/components/search/no-results-message.vue @@ -1,9 +1,10 @@