-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
null support for NutritionalValues #614
Comments
For the ingredient model in the backend we have:
This would translate to
How do we want to handle cases where a list of We can:
The second option feels more correct, but it would increase the complexity. I know a commercial app like myfitnesspal chooses the first option presumably for this reason. @Dieterbe what are your thoughts? |
So, we are effectively talking about aggregates of nullable values. I have thought in the past there was a use case for upper limits as well, but I can't remember what it was. |
@Dieterbe What do you think of something like this for the visuals? |
ok i just remembered some use cases for having an upper limit:
therefore i suggest we introduce a new custom datatype, called we then need to be able to render them. my suggestion is something like this:
i wouldn't use those warning triangles you show, however if we have any non-precise values, i would show a banner similar to what you show, which on tap woud show a dialog with more information about what these values mean |
Those are good rules! At the moment we only apply some very simple ones when importing the ingredients. I can run them on the DB and see if there are any that cause problems. Also, the upper limit will always be 100% of the product weight, no need for infinity:) |
FYI, from the 2.443.821 ingretients in the db:
are NULL |
the following fields should be nullable. they can be null if the data is missing in OFF. currently we set them to 0, which is a bug
the wger backend is supposed to already handle this properly, but we don't properly handle this in flutter.
The text was updated successfully, but these errors were encountered: