nutritionix / nutrition-label

Create a FDA-style nutrition label with any nutrition data source (even the Nutritionix API - http://www.nutritionix.com/api)
http://www.nutritionix.com/
MIT License
176 stars 66 forks source link

The Serving Weight moves to the next line when the serving size is changed #82

Closed majin22 closed 7 years ago

majin22 commented 7 years ago

reported internally here https://github.com/mattsilvllc/NewSiteDesign/issues/1562

try the label here https://www.nutritionix.com/i/blains-farm-fleet/pistachio-nuts/552bc3df0ab300ad64cc0673

majin22 commented 7 years ago

@genesis23rd can you review this as I think this is a limitation that we can't solve

the problem is when a decimal value is added on the serving weight grams, it increased the length of the text which is why the text is pushed down

it you keep changing the value (keep clicking the arrows) and when the serving weight grams has no decimal value, the text will be on the same line as the textbox again

I believe this behavior can be considered normal

what do you think?

thanks

genesis23rd commented 7 years ago

@majin22 Not a bug. Before it was only the Serving Weight that moves down which kinda looks odd. So we made a fix and combined the Serving Unit and Serving Weight into one wrapper div so it moves down together when text gets longer.

majin22 commented 7 years ago

for documentation purposes https://www.youtube.com/watch?v=aIHKjcpcCe0&feature=youtu.be&hd=1 created by https://github.com/pzykoh