-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Transportation Component Icon and title color is not compatible with background color. #1347
Comments
If anyone is already working on this issue ,do let me know. |
I believe this is something we set partly client and server side. I'd like to have @stephanegigandet 's input before changing anything there. |
Here are the colors we currently use on the Open Food Facts website, based on colors selected by Tim: $grade-a-color: #219653; $evaluation-good-color: #219653; |
@teolemon currently the evaluation for the transportation is given neutral for the onboarding ,and the color for the neutral is GREY_COLOR in knowledge_panel_title_card.dart,which I think is the reason for the transportation icon not being compatible with current background. "manufacturing_place": {
"elements": [{
"element_type": "map",
"map_element": {
"pointers": [{
"geo": {
"lat": 48.7951886,
"lng": 2.4871653
}
}]
}
}],
"evaluation": "neutral",
"expanded": true,
"level": "info",
"title_element": {
"icon_color_from_evaluation": true,
"icon_url": "https://static.openfoodfacts.org/images/icons/dist/transportation.svg",
"subtitle": "SAINT-MAUR-DES-FOSSES - France",
"title": "Manufacturing or processing place"
},
"topics": ["environment"]
}, Color? _getColorFromEvaluation(Evaluation evaluation) {
switch (evaluation) {
case Evaluation.BAD:
return RED_COLOR;
case Evaluation.NEUTRAL:
return GREY_COLOR;
case Evaluation.AVERAGE:
return LIGHT_ORANGE_COLOR;
case Evaluation.GOOD:
return LIGHT_GREEN_COLOR;
case Evaluation.UNKNOWN:
return null;
}
} |
Hi, |
@bhattabhi013 Not exactly: the asset file you're referring to is the fallback file, if you don't have internet /// Was computed from [downloadDataString] in en_US
///
/// Something like https://world.openfoodfacts.org/api/v2/product/093270067481501/?fields=knowledge_panels&lc=en&cc=US
@override
String getAssetPath() => 'assets/onboarding/sample_knowledge_panels.json'; |
Thanks for clearing the doubt @monsieurtanuki, should I do it this way? |
@bhattabhi013 I have no added value in color choice. What I can suggest is that:
|
Hi @monsieurtanuki, |
What
Screenshot/Mockup/Before-After
The text was updated successfully, but these errors were encountered: