-
-
Notifications
You must be signed in to change notification settings - Fork 764
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 custom scaling option #1345
Conversation
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.
Very Cool! Thanks for taking a look at this, overall I like the implementation. I would like this to be implemented with a Menu type interface instead of a dialog. Like how the "Image" and "Setting" buttons have. I think that would be easier to use.
Example
Let me know if you want to take a stab at implementing with the other style, if not I can take this one over the finish line.
Thanks! 🚀
Ah yeah I originally wanted to use exactly such solution but did not know how to implement it. |
Ah looks nice that way yeah. Do you mean the scale display in the field (e.g., 4 x 5 = 20 servings?) |
Yeah, it causes a significant UI shift when you tap the -/+ button from 1 to 2 which isn't ideal, but maybe other people will like the clear display 🤷 |
We could move + / - to the left maybe? Then it would not move (this might also make more sense as the scale is "before" the servings) |
Hm okay I got both of them, I will check again. If we now have enough space, we could explain it maybe? Or is this too detailed? |
Or maybe we should think about just defining servings and make the scale something internal? (at least when your recipe has a servings number defined, else an ingredient scale makes sense) |
Okay so you just removed the text and merged now without further discussion? 😅 Sorry but this is confusing for me. That's not how I interpret contribution.. |
I had a response typed up but forgot to submit it before I merged. I felt like there were two things in this one, and I wanted to get that initial feature merged so I could make some other some-what related changes without causing too many merge conflicts. I removed the text and merged the core feature while keeping the main UI the same as it was. What I was going to ask was for you to submit a different PR with a proposed update for how servings are displayed and then we can talk about that in isolated and hopefully get some feedback from the community. Hope that's fair? Sorry about the confusion. |
Ahh okay now it makes much more sense :D I'll make a separate PR about the display in the next days. What do you think about switching from servings to scaled input when there is a base servings amount given? Yeah sounds good, thanks for the quick explanation! |
Hi there! thank you for your work on the custom scaling. I feel that it would be beter to be able to change the number of servings. is that something which was considered or will be considered in the future? |
This implements the possibility to enter a custom scale factor.
When no servings are configured and no scale set, it looks like this:
When clicking on x1 (a tooltip shows the option "Edit Scale"), the scale dialog is shown:
The user can then enter any number (including 0.5 for example) which then after clicking save changes the scale.
The scale can also be reset to 1 using the IconButton.
When servings are configured (in this example servings=1) it looks default like:
When the scale is modified it looks like this:
Some open questions might be:
In addition to the custom button now, I also added tooltips for increase and decrease scale to make it clearer what the buttons do.
I am happy to get some feedback about the implementation :)