Skip to content
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

feat: 972 - new "product_type" field for Product #973

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • New field for Product: ProductType? productType.
  • Values for food, beauty, pet food and product.
  • Later, the server will populate this field.
  • For the moment, we can say "hey, I extract data from openbeautyfacts, therefore I can manually set the type to beauty for my local data".
  • Then we're able to say things like "hey, this is a beauty product, don't show the nutriscore!"

Fixes bug(s)

Files

New file:

  • product_type.dart: Type used at the product level (e.g. "this is a pet food product").

Impacted files:

  • openfoodfacts.dart: exported new file product_type.dart
  • product.dart: added a new ProductType? field
  • product.g.dart: (generated)

New file:
* `product_type.dart`: Type used at the product level (e.g. "this is a pet food product").

Impacted files:
* `openfoodfacts.dart`: exported new file `product_type.dart`
* `product.dart`: added a new `ProductType?` field
* `product.g.dart`: (generated)
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner September 13, 2024 13:49
@teolemon teolemon added 🧴 Open Beauty Facts Our cosmetic analysis project https://world.openbeautyfacts.org 📸 Open Products Facts 🐾 Open Pet Food Facts Our pet food analysis project https://world.openpetfoodfacts.org labels Sep 13, 2024
Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @monsieurtanuki. Sound in line with @stephanegigandet 's proposal 👍

@monsieurtanuki monsieurtanuki merged commit 3613a0e into openfoodfacts:master Sep 14, 2024
4 of 5 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!
I can start some tests in Smoothie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧴 Open Beauty Facts Our cosmetic analysis project https://world.openbeautyfacts.org 🐾 Open Pet Food Facts Our pet food analysis project https://world.openpetfoodfacts.org 📸 Open Products Facts
Development

Successfully merging this pull request may close these issues.

Add a "flavor"/"server type" to products
2 participants