Mobile integration for the new External Sources feature #1151
Replies: 7 comments 7 replies
-
|
IMPORTANT: also check out openfoodfacts/openfoodfacts-server#12070 to understand the greater scope. |
Beta Was this translation helpful? Give feedback.
-
|
I'm available for a meeting in Paris next week. |
Beta Was this translation helpful? Give feedback.
-
|
Here is the result that the API about external_sources will send back: https://github.com/IWouldShiverTheWholeNightThrough/openfoodfacts-server/tree/feature/external-sources-optin/tests/integration/expected_test_results/external_sources (note: the PR of this branch is here) |
Beta Was this translation helpful? Give feedback.
-
|
I've started pseudo coding this morning. In dart we'll use a new filter class, with a filter method that will use the product type and categories as well as the current app country and language. Something like that class ExternalSourceFilter{
bool accepts(
final Product product,
final OpenFoodFactsLanguage language,
final OpenFoodFactsCountry country,
);Regarding the knowledge panel url (currently http://127.0.0.1:8000/off/v1/knowledge-panel/$code?lang=$lc&country=$cc):
In short, if possible we should ask the external sources to
|
Beta Was this translation helpful? Give feedback.
-
|
@monsieurtanuki the PR is merged and visible on staging: https://world.openfoodfacts.net/api/v3/external_sources |
Beta Was this translation helpful? Give feedback.
-
|
Hi, i wondered @monsieurtanuki if you've started working on the dart part, if everything's alright or if you need further informations/support etc :D |
Beta Was this translation helpful? Give feedback.
-
|
Oh, I've finished coding about a week ago: #1157 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We’ve just completed the web integration for our Empreinte Souffrance panel, see Pull Request #12235 openfoodfacts/openfoodfacts-server#12235
, which is nearly finished.
Context
Empreinte Souffrance (also known as L’Heure des Comptes) is a Data For Good project supported by Anima International. (see: https://website.services.dataforgood.fr/projets/l-empreinte-souffrance-des-produits-d-origine-animale )
Our goal is to estimate an animal suffering footprint for food products.
For now, we focus on eggs.
What we did on the web
While adding our panel, we also introduced a new Open Food Facts feature: External Sources.
It allows partner organizations to attach their own information panels to product pages via the external_sources configuration.
These panels can be user-activated (opt-in) and dynamically adapt to the product’s context.
Next step: mobile integration
We’d now like to bring this new External Sources system to the mobile app (Dart/Flutter).
Pierre prepared a short technical document describing the required integration steps:
Technical doc: https://docs.google.com/document/d/1jqZYtTMP5Hj5hQ-DcTcy1YQvoUXepyzsx2VzU-HEiOU/edit?usp=sharing
Since we’re not very experienced with Dart, we’d appreciate your advice or guidance on how to best approach this implementation on mobile.
If convenient, we’d be happy to schedule a short call or even meet in person (we’re based near Paris) to discuss it further.
Any help or insight from @monsieurtanuki, @g123k, or @teolemon would be greatly appreciated.
Thank you for your time and support,
Beta Was this translation helpful? Give feedback.
All reactions