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

Allow scaling measurements that are included in recipe instruction steps #1349

Open
ChrisFhey opened this issue Mar 14, 2024 · 2 comments
Open
Assignees
Labels
proposal/idea Anything that isn't actionable

Comments

@ChrisFhey
Copy link

Is your idea or proposal related to a problem? Please describe.
When scaling the ingredient measurements of a recipe, measurements that are included in the recipe instructions are not scaled along, which can cause confusion while cooking.

Describe your idea or proposal
I would like to be able to add measurements in the instruction steps, and have those measurements scale along with the ingredient measurements according to the recipe's scale setting. To make it easier for the app to recognise and scale measurements in the instruction steps, they might be surrounded by braces or similar.

e.g.: Add {320 ml} of milk to a bowl, with scaling set to 2x would be printed as Add 640 ml of milk to a bowl.

@ChrisFhey ChrisFhey added the proposal/idea Anything that isn't actionable label Mar 14, 2024
@julianpoy
Copy link
Owner

julianpoy commented Mar 15, 2024

I do think it'd be possible to accomplish this even without the curly brace syntax. We have a list of "all" units from unitz-ts, and could parse through and scale anything with a recognized \d+ (M) where M is a list of all known units. The goal there would be that something like "20 minutes" would not be scaled, while "2 cups" would be scaled.

That said, your curly brace syntax proposal would make the task fairly trivial, since very little parsing or edge cases would need to be considered.

Thanks for opening the issue!

@ChrisFhey
Copy link
Author

Yes, that's exactly why I suggested working with braces or something similar surrounding the measurements to avoid non-measurement units being scaled up as well.

I think it would be fine to incorporate as such, as long as the expected syntax is explained in the project's user guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal/idea Anything that isn't actionable
Projects
None yet
Development

No branches or pull requests

2 participants