-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
fix: Recipe Search URL State #3332
fix: Recipe Search URL State #3332
Conversation
- update state when there are no query params - only call search if the query params actually changed - wait until ready to call API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks a big search improvement 🚀🚀
Only thing holding me up from merging is that the query is also applied after i close and reopen the page.
Imagine the situation: I use mealie to cook todays dinner. Afterwards i close the page. Tomorrow i navigate to mealie.example.com, but instead of landing on the home page with all my recipes, the search with the same querry parameters is opened.
This seems quite contra-intuitive to me.
@@ -9,7 +9,7 @@ | |||
color="accent" | |||
:small="small" | |||
dark | |||
:to="isOwnGroup ? `${baseRecipeRoute}?${urlPrefix}=${category.id}` : undefined" | |||
:to="`${baseRecipeRoute}?${urlPrefix}=${category.id}`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The chip stays clickable if the user is not allowed to access the RecipeExplorerPage which will then just redirect to login.
This happens if the group is private and the recipe is accessed via a shared link by a non logged in user.
So it is pretty niche occurance.
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
This fixes a bunch of issues with the homepage's recipe search and URL state. Namely:
This also adds a user state for the last set of search params, i.e. next time you open Mealie your last search will be restored. There are two exceptions to this:
https://MyMealieSite.com/g/home?tags=abc-123
) then the query params are respected, and your last search is ignoredWhich issue(s) this PR fixes:
(REQUIRED)
Fixes #2447
Fixes #2352
Fixes #2259
Fixes #931
Testing
(fill-in or delete this section)
Lots of clicking