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

fix: Refresh recipe section when clicking card tag chip #4810

Merged
merged 9 commits into from
Jan 14, 2025

Conversation

parumpum
Copy link
Contributor

@parumpum parumpum commented Jan 1, 2025

What type of PR is this?

  • bug

What this PR does / why we need it:

On the recipe explore page, clicking a Tag inside a recipe card was rewriting the URL and not updating the page to reflect the Tag search.

This updates the Tag chip to append the tag query to the existing query, and trigger a refresh of the Recipe Section.

Which issue(s) this PR fixes:

Fixes #4776

@github-actions github-actions bot added the bugfix label Jan 1, 2025
Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

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

Hey thanks for your contribution, always nice to see new people around helping out.

I had a quick look around and found a few bugs that need to be adressed:.

  1. The selected tag should be added to the tags filter below the search bar
  2. Clicking on the mealie symbol on the top left should when already in search should clear the filter if already on the search window
  3. Breaks functionality on pages that are not the main search page by just appending the filter instead of navigating to the main page and setting the filter.
    3.1 Manage Data - Recipe (http://localhost:3000/group/data/recipes) - Break filter Button for Tools, Categories and Tags
    3.2 Recipe Page - Breaks Buttons for Categories and Tags

Thats quite a bit, but i think they are mostly connected and can probably be adressed at once. If any questions arise feel free to reach out here or on the Discord and the dev team or the community will try to answer them.

@parumpum
Copy link
Contributor Author

parumpum commented Jan 6, 2025

Addressed feedback.

  1. Clicking the tag properly checks the item in the dropdown below the search bar, refreshing the search.
  2. Filter gets cleared when clicking Mealie on the top left
  3. Not appending the query into the URL so addresses remaining issues.

Clicking the tag within /group/data/recipes will go to main page and search that tag. Can remove this piece if not desired behavior. Future work here would be to make the data table on /group/data/recipes filterable/searchable.

@parumpum parumpum requested a review from Kuchenpirat January 6, 2025 20:53
Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

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

Hey thanks for the quick turnaround.

  1. & 2. Has been adressed by your changes and work as expected 👍

I still see issues with 3.

  • On the recipe page i cannot click any of the Categories and Tags of the recipe (which should redirect to the search page with the filter applied)
  • On the Data Management page the behaviour is as expected for Tags but clicking on Categories and Tools does nothing.

There are also some linting errors

@parumpum parumpum requested a review from Kuchenpirat January 7, 2025 14:39
Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

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

This works now as expected, thanks for your work on this 😊

Just a few unused imports to remove and then we can get this in

frontend/components/Domain/Recipe/RecipeCardSection.vue Outdated Show resolved Hide resolved
@parumpum parumpum requested a review from Kuchenpirat January 14, 2025 03:08
Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

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

When doing my final testing i found that this is still not working on the RecipeCardMobile.
Probably an easy fix since it should just provide the same functionality as the normal RecipeCard.

@parumpum
Copy link
Contributor Author

When doing my final testing i found that this is still not working on the RecipeCardMobile. Probably an easy fix since it should just provide the same functionality as the normal RecipeCard.

Definitely was an easy fix thankfully!

Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

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

Perfect, all good to go. Thanks for your work on this!

@Kuchenpirat Kuchenpirat merged commit 203218a into mealie-recipes:mealie-next Jan 14, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - Recipe Explore Page - filter with tags on recipe cards broken
2 participants