-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
feat: Recipe Actions #3448
feat: Recipe Actions #3448
Conversation
simplified store interface added action type to data management page
13402b7
to
6446d1a
Compare
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.
Finally had time to look at this beauty 😊
Looks all good, just some small things.
And would additionally suggest you run task docs
to update the api reference in the docs.
tests/integration_tests/user_group_tests/test_group_recipe_actions.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Kuchenpirat <[email protected]>
…ions.py Co-authored-by: Kuchenpirat <[email protected]>
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.
Looking Good 😊🚀
However this requires the mealie instance to be publicly available from the internet. Optimally the mealie instance would send the data of the reciepe directly (just like the I am currently thinking about how to avoid needing the mealie instance to be public. One idea I have to setup a local simple webserver that listens for |
Not necessarily, you just need internet access from the device you're using. It opens the target URL in a separate tab
Yup, that is another solution, to create your own webservice |
I dont understand. Using the Can you please elaborate how this would work without the mealie instance to be public? |
Sorry, my mistake, I forgot this API scrapes. I was looking at another bring endpoint that accepts posts (the one you shared above). With the get method your instance does need to be public |
No problem. I will build a webserver based on python which does the method I described above. Afterwards, I will publish it, might be interesting for others too. The bring api supports |
Yeah if you could open a feature request for it that would be great |
Great! Will do this later today or tomorrow. Thank you in advance! |
Done in #3610 |
I am currently working on the python server that sends the data to the Bring API. Making great progress; I will release some source code and a container image in the next few days |
For anyone who is interested: You can find the code and a container image here. |
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
This adds Group Recipe Actions to Mealie, allowing for custom "actions" on all recipes. This is specifically to address integrating with the Bring! shopping list (which has been requested a lot), but has other uses as well.
Recipe actions add custom menu options on all recipes:
They're managed through the Manage Data page:
"link" actions simply direct you to the target URL (using
target="_blank"
so a new tab is opened). "post" actions send a post request to the target URL and display a message once the request is complete.The URL can be customized with merge fields a la JS string interpolation. For example, this is how you integrate with the Bring! shopping list:
This is what I used for testing the POST requests:
(note: it doesn't actually use JS string interpolation, since that would require an
eval
expression, it just usesaction.url.replace(...)
)POST requests also include the recipe JSON in the request body.
EDIT: the updated menu, with some style changes:
Which issue(s) this PR fixes:
(REQUIRED)
Closes #790
Closes #1838
Closes #2589
Testing
Tests for backend, manually for frontend