-
-
Notifications
You must be signed in to change notification settings - Fork 446
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 support for the new server controlled product page layout #3501
Comments
@VaiTon is suggesting we split the issues into 2 parts:
|
I have some Java experience, but this looks like a challenge to me. Nevertheless, may I have an attempt at helping with this? Thank you! |
Sure you can @elizabethqiu! You should first try to implement the API side via retrofit, then try to integrate it into the database to make the product available offline after first scan (this can be postponed, let's create a new issue for this). |
I actually changed my mind-- unfortunately I will not be able to help out with this. Thank you for understanding! |
Do we have a chance to ship a first version of this before Jan 7th? |
What is this ??
Product Attributes offer a flexible way to show product information without having to update the app whenever we want to add a new attribute or translation. The server sends a JSON with all the images, translated info that's necessary
What will it look like ?
How to implement this ?
Looking at the iOS code
We have a 1st implementation of attributes for iPhones if you want to study the code
API binding: https://github.com/openfoodfacts/openfoodfacts-ios/pull/748/files
Frontend: openfoodfacts/openfoodfacts-ios#780
Wiki
For more background and details, you can also see https://wiki.openfoodfacts.org/Product_Attributes
To retrieve the attributes, they need to be explicitly requested in the query ( so we need to suffix &fields=attributes_en to the queries we're currently making).
Sample output
https://fr.openfoodfacts.org/api/v0/produit/3596710364015/creme-entiere-fluide-bio-30-mg-auchan?fields=product_name,code,attribute_groups
https://fr.openfoodfacts.org/api/v0/produit/3596710364015/creme-entiere-fluide-bio-30-mg-auchan?fields=product_name,code,attribute_groups_en
https://fr.openfoodfacts.org/api/v0/produit/3596710364015/creme-entiere-fluide-bio-30-mg-auchan?fields=product_name,code,attribute_groups_fr
openfoodfacts/openfoodfacts-server#4113
What should we do with the existing fields ?
Option 1: We could move all the raw data currently on the summary tab to a secondary tab for power users (like the full list of labels), enabled or disabled from the settings
Option 2: put it at the bottom of the summary tab
Option 3: dispatch it by theme to various tabs (some may actually be redundant, and fully deleted)
The text was updated successfully, but these errors were encountered: