-
-
Notifications
You must be signed in to change notification settings - Fork 87
Add option to autoscale foods via OpenFoodFacts #501
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
Conversation
|
Could you attach screenshots to understand better on this. |
Added DB Migration for table
|
is anything pending or shall i go ahead & merge it? where you able to test that it doesn't affect other food providers? |
|
I unfortunately don't have any other providers to test at the moment. I can set one up some time today; with that, the scaling takes place in the |
|
Hi @Gtt1229 there was a big change from another PR. So I had to hold this one as the other one involved changing lot of pages. Now your PR has some conflict. could you re-submit again. sorry for the inconvenience. Thanks for your help.. |
I made the changes, just looks like the lists were cleaned up. I will test my instance later today, please hold on merge. |
|
@Gtt1229 @CodeWithCJ Just wanted to say THANK YOU for adding auto scaling, incredibly useful and solves one of my biggest gripes with adding new food. Do I need to check "auto-scale" on the Add Custom Food screen? I've been clicking it because it seems to not work otherwise, but wanted to see if it's user error somewhere. Also, is it possible to do the same for "FatSecret" provider? I've had better luck using them (larger database and faster results). |
Of course! And its 2 different things. Under Settings -> Preferences -> You have to enable and save: Auto-scale OpenFoodFacts Imports. The treatment following is the results from OoenFoodFacts will be scaled to the serving size during import. Auto scale can be used in the event you need to change during import (or edits in general). Basically, I generally do 2 entries for my imports. 1 entry for the grams, and then another duplicate entry as the default for "prices/bar/serving/etc". If you don't do the grams, you can't reliably do measurement if you need it. I'll upload some images of the whole process later today to better specify. |
If possible, submit as PR to improve the doc on this part.. |
|
Here is the documentation breaking it all down: https://codewithcj.github.io/SparkyFitness/features/settings/preferences I'll take a look at FatSecret. Never used it. |
|
@frozendevl Based in their API docs, it looks to me like FatSecret should already return results based on their servings sizes. |




This is my take on my feature request:
#468
Creates an option (disabled by default) that can be toggled that will enable scaling of serving size automatically form OpenFoodFacts
I am not too confident in my implementation for best practices of this project as a whole, so please forgive me.