From 2c20e96ede37adfb3b522b32fab64e33ab59b719 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Tue, 9 Sep 2025 03:16:37 -0500 Subject: [PATCH] fix: Refactor and Optimize Explore Page Search (#6070) Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com> --- .../Domain/Recipe/RecipeExplorerPage.vue | 715 ------------------ .../RecipeExplorerPage/RecipeExplorerPage.vue | 72 ++ .../RecipeExplorerPageSearch.vue | 226 ++++++ .../RecipeExplorerPageSearchFilters.vue | 104 +++ frontend/components/Domain/SearchFilter.vue | 55 +- .../composables/use-recipe-explorer-search.ts | 465 ++++++++++++ frontend/pages/g/[groupSlug]/index.vue | 2 +- 7 files changed, 911 insertions(+), 728 deletions(-) delete mode 100644 frontend/components/Domain/Recipe/RecipeExplorerPage.vue create mode 100644 frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPage.vue create mode 100644 frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts/RecipeExplorerPageSearch.vue create mode 100644 frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts/RecipeExplorerPageSearchFilters.vue create mode 100644 frontend/composables/use-recipe-explorer-search.ts diff --git a/frontend/components/Domain/Recipe/RecipeExplorerPage.vue b/frontend/components/Domain/Recipe/RecipeExplorerPage.vue deleted file mode 100644 index 936d4a6e7..000000000 --- a/frontend/components/Domain/Recipe/RecipeExplorerPage.vue +++ /dev/null @@ -1,715 +0,0 @@ - - - - - - - - - - - - {{ $globals.icons.categories }} - - {{ $t("category.categories") }} - - - - - - {{ $globals.icons.tags }} - - {{ $t("tag.tags") }} - - - - - - {{ $globals.icons.potSteam }} - - {{ $t("tool.tools") }} - - - - - - {{ $globals.icons.foods }} - - {{ $t("general.foods") }} - - - - - - {{ $globals.icons.household }} - - {{ $t("household.households") }} - - - - - - - - {{ state.orderDirection === "asc" ? $globals.icons.sortAscending : $globals.icons.sortDescending }} - - {{ $vuetify.display.xs ? null : sortText }} - - - - - - - - - - - - - - - - - {{ $globals.icons.cog }} - - - - - - - - {{ $t("general.reset") }} - - - - - - - - - {{ $globals.icons.search }} - - {{ $t("search.search") }} - - - - - - - - - - - - - - diff --git a/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPage.vue b/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPage.vue new file mode 100644 index 000000000..e83e75c54 --- /dev/null +++ b/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPage.vue @@ -0,0 +1,72 @@ + + + + + + + + + + + diff --git a/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts/RecipeExplorerPageSearch.vue b/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts/RecipeExplorerPageSearch.vue new file mode 100644 index 000000000..421344513 --- /dev/null +++ b/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts/RecipeExplorerPageSearch.vue @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + {{ state.orderDirection === "asc" ? $globals.icons.sortAscending : $globals.icons.sortDescending }} + + {{ $vuetify.display.xs ? null : sortText }} + + + + + + + + + + + + + + + + + {{ $globals.icons.cog }} + + + + + + + + {{ $t("general.reset") }} + + + + + + + + + {{ $globals.icons.search }} + + {{ $t("search.search") }} + + + + + + + + + diff --git a/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts/RecipeExplorerPageSearchFilters.vue b/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts/RecipeExplorerPageSearchFilters.vue new file mode 100644 index 000000000..29b09948f --- /dev/null +++ b/frontend/components/Domain/Recipe/RecipeExplorerPage/RecipeExplorerPageParts/RecipeExplorerPageSearchFilters.vue @@ -0,0 +1,104 @@ + + + + + {{ $globals.icons.categories }} + + {{ $t("category.categories") }} + + + + + + {{ $globals.icons.tags }} + + {{ $t("tag.tags") }} + + + + + + {{ $globals.icons.potSteam }} + + {{ $t("tool.tools") }} + + + + + + {{ $globals.icons.foods }} + + {{ $t("general.foods") }} + + + + + + {{ $globals.icons.household }} + + {{ $t("household.households") }} + + + + diff --git a/frontend/components/Domain/SearchFilter.vue b/frontend/components/Domain/SearchFilter.vue index fe98564d0..1572b8dc0 100644 --- a/frontend/components/Domain/SearchFilter.vue +++ b/frontend/components/Domain/SearchFilter.vue @@ -9,10 +9,11 @@ > @@ -101,7 +104,8 @@ > @@ -134,6 +138,8 @@