-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
decimals in properties issue #2518
Comments
can confirm this is buggy first of all food amounts did not support decimals, i added that but there is something else broken, looking into what it is |
fixed the other issue as well |
Thanks, is better but i'm still easily getting incorrect results. Couple of examples:
In a recipe which calls for 1.5 cups of all-purpose flour I get the correct totals for carbs and protein. In all cases I'm drilling to the recipe by selecting "16 recipes" under all-purpose flour. |
ok thanks, i need to look into that, reopening for now |
i think all of this might be releated to a bug in the frontend. I wasn't abel to fully test this as i need to leave my desk now but i pushed the fix on beta (which is currently pretty stable). The problem was that the food editor would always show gram as i had a small piece of code setting the frontend to "g" regardless of what it actually was. so you probably had cups set but it was showing grams. I did it to set the default unit to g but forgot to check if anythign else was already present. If you want you can try out if the issue is fixed, if not i will when i get the time to do so |
Sorry, I never switched to beta. I'm not seeing any difference on mainline (yet). |
Ah, I take that back, it is better. What I'm seeing now is that some recipes I used the word cups when it was > 1 cup and my conversion is for cup. I added an identical conversion for cups and now it works. This is fine, but I mention only because you might want to add volume equalities globally. Then you could automatically include plurals as well as common things like 3tsp == 1Tbl so we don't have to add them everywhere. Is it possible to manually add another property? Sodium, Potassium in particular. These have an impact on kidneys and some people count them, if I'm going to enter this stuff I'd like to enter these as well. Thanks! |
if you have plurals or not depends on what units you created. if you created cup and cups seperately you will need to add your own conversions, but you can also add cup with plural cups and only need one. regarding properties: you can add as many properties as you like on the property type page |
Sorry I poked around and I can't figure out what this means: "you can also add cup with plural cups and only need one". Are you just saying use the plural all the time or is there a feature to somehow add cup along with cups and it will treat like one unit? I don't see many options on the unit editor. Just "name, description and Open Data Slug". Is open data slug some way to extend to plurals? thx |
Wierd that is not what I see. I only have name, description, and open data slug. Maybe I should switch to beta? |
I'm not on beta (version 1.5.4) and I can enter plural names of ingredients. Can you double check the version you are running on @dsm1212? You can view it in Tandoor through the |
Oh, wait, I'm choosing + from the units window. Are we talking about the Ingredients window? I have not used that yet. Foods seems to list all my ingredients so I'm not sure what the ingredients window does :-(. It has nothing in the list there right now. |
Ok even though I'm not 100% sure what this window does, I got it to work. If I add the plural and then merge the plural to the singular it ends up in the right place. Very nice, thanks! |
That is super strange, there used to be a setting of plurals should show or not but that was removed a few versions ago. Need to look into the code to see why this happens |
ok so i looked at the code, i cannot find any condition that would hide the plural field. There was one in old versions so i suspect there could be a caching thing if you are on the latest version. Can you check that you have the latest version installed and maybe clear the browser cache? this way there should not be any units left where you cannot edit the plural. |
I had already tried those things and I wiped my static files and used incognito, but did you see my last update? I can get to the window with the plurals from the ingredients window. From the units window I get the version without the plural. My version is 1.5.4.-SteveOn Aug 7, 2023, at 1:37 AM, vabene1111 ***@***.***> wrote:
ok so i looked at the code, i cannot find any condition that would hide the plural field. There was one in old versions so i suspect there could be a caching thing if you are on the latest version.
Can you check that you have the latest version installed and maybe clear the browser cache? this way there should not be any units left where you cannot edit the plural.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
yea I saw your message but was unsure what it meant. Need to look again but both windows should call the same function 🤔 |
FWIW to this day I still don't see plurals on the edit window from the unit list. I can only get at them from selecting the unit in the ingredient window and chosing edit. The other odd thing is after editting a plural from the ingredient window if I choose a different unit the list of recipes updates correctly but if I then pick edit on the new unit no windnow comes up. I have to refresh the tab to edit a second unit from the ingredient window. |
Upgraded to latest and I can edit plurals in the units page :-) |
from @dsm1212
I realized you are still working on this so not submitting an issue, but the few things I tried to enter as a food just won't take. Here's a simple one. Baking powder at 1tsp (or 4.6g) has 1.3g of carbs. I tried to enter this multiple ways and none will work correctly. 4.6g/1.3g is an error saving. 1tsp/1.3g won't save correctly, it says success but ends up saving 1g/1.3g and with that impossible combo for 1tsp in recipe it show 0.05g of carbs which is odd. 46g/13g will save but the carb calculation for 1tsp in a recipe is 0. Probably I'm not doing the right thing with units.
The text was updated successfully, but these errors were encountered: