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

Add yield and fraction button to scale modal #1452

Open
DanTup opened this issue Sep 20, 2024 · 3 comments
Open

Add yield and fraction button to scale modal #1452

DanTup opened this issue Sep 20, 2024 · 3 comments
Assignees
Labels
open to contributors A good issue for a contributor to tackle proposal/idea Anything that isn't actionable

Comments

@DanTup
Copy link

DanTup commented Sep 20, 2024

I added the Pizza Dough recipes from Ooni which makes 4x 12" pizza doughs. I entered '4 12" Pizzas' in the Yield field and copied the ingredients amounts as-is, and I see there's a Scaling option when I view the recipe, but because the original recipe is for 4 doughs, the scaling options are slightly awkward (eg. I'd have to enter 1/4 if I wanted to make one, or 5/4 if I wanted to make 5).

While I could scale the default recipe down to 1/4 of the amounts and then the scaling amounts would be "per dough", it might be nice if the yield info could be used in the UI for scale. Eg. if I enter "4 Doughs" (or "4 People") in the yield box, have the scaling UI show "1 Dough", "2 Doughs" etc.. That would make it easier to make "5 doughs" from a "4 dough" recipe, for example.

(Thanks for the app! I'm trying to find a decent recipe app that I can access across devices - all the others I've tried so far have had annoyances that made me discount them very quickly, but so far I quite like this one :-))

@DanTup DanTup added the proposal/idea Anything that isn't actionable label Sep 20, 2024
@julianpoy
Copy link
Owner

While I'd love to do this, I do believe this has a high chance of being inconsistent unfortunately. It would also involve a lot of language-specific parsing.

I do believe there are two approaches we could take here to improve the experience:

  1. Display the yield within the scale modal
  2. Add a 1/2 button to the scale modal

@julianpoy julianpoy added the open to contributors A good issue for a contributor to tackle label Oct 24, 2024
@julianpoy julianpoy changed the title Allow setting a "default scale" on recipes (or use Yield to inform scale UI) Add yield and fraction button to scale modal Oct 24, 2024
@DanTup
Copy link
Author

DanTup commented Oct 25, 2024

There's already a 1/2 button for scaling, but you still have to do the maths in your head (like if it makes 5 portions, 1/2 doesn't help). Showing the yield field on the popup would definitely help.

What about recognising something very specific, like "(\d+) portions" in the yield field, and if it matches then on the scale popup, show an additional label with the new portion number? You could show a tip: "Enter yield as x portions for easier scaling" to encourage people to do this, but if they enter free text it'd still work as-is today.

Eg.:

  • if my yield says "2 portions" and I select 4 on the scale poup, show "8 portions"
  • if my yield says "2 dough balls" and I select 4 on the scale popup, just shows "4x 2 dough balls"

This would allow the maths to be done automatically if we stick to the format, but doesn't risk showing anything incorrectly for those that don't. (you could probably even support some additional strings like "portions|person|people" where it's clear they'd work correctly, even if the tip only suggests one of them).

@PredaGergely
Copy link
Contributor

I also would like to have this feature, and I think it can be done quite simply: just parse the first number in the yield field regardless of what text is after (before) it. I think this number is most likely the number you would like to scale then. Making the number bold would also help detecting problems of course.
Showing the yield in the scale modal is also a good idea, together with this feature or if all else fail, on it's own.

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

No branches or pull requests

3 participants