-
-
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
Show the Products Edited by the user #2315
Comments
@teolemon links or pages on the app |
Native pages of products in the app, so that people can go back to those products, and work on them |
|
…le screen New files: * `contributor_product_query.dart`: User Product Search, in "contributor" mode. * `informer_product_query.dart`: User Product Search, in "informer" mode. * `paged_search_product_query.dart`: Back-end paged queries around search. * `paged_user_product_query.dart`: Back-end paged queries around User. * `photographer_product_query.dart`: User Product Search, in "photographer" mode. * `to_be_completed_product_query.dart`: User Product Search, in "to be completed" mode. Impacted files: * `category_product_query.dart`: refactored with new class `PagedSearchProductQuery` * `keywords_product_query.dart`: refactored with new class `PagedSearchProductQuery` * `paged_product_query.dart`: now limited to page management * `product_list.dart`: added `enum`s and constructors around user queries * `product_list_page.dart`: added cases for the new 4 product list types * `product_query_page_helper.dart`: added cases for the new 4 product list types * `user_preferences_account.dart`
) New files: * `contributor_product_query.dart`: User Product Search, in "contributor" mode. * `informer_product_query.dart`: User Product Search, in "informer" mode. * `paged_search_product_query.dart`: Back-end paged queries around search. * `paged_user_product_query.dart`: Back-end paged queries around User. * `photographer_product_query.dart`: User Product Search, in "photographer" mode. * `to_be_completed_product_query.dart`: User Product Search, in "to be completed" mode. Impacted files: * `category_product_query.dart`: refactored with new class `PagedSearchProductQuery` * `keywords_product_query.dart`: refactored with new class `PagedSearchProductQuery` * `paged_product_query.dart`: now limited to page management * `product_list.dart`: added `enum`s and constructors around user queries * `product_list_page.dart`: added cases for the new 4 product list types * `product_query_page_helper.dart`: added cases for the new 4 product list types * `user_preferences_account.dart`
What do you mean ? I'm not quite sure. You mean Eco-Score and Nutri-Score are not displayed ? |
Impacted file: * `paged_user_product_query.dart`
…localized Impacted files: * `app_en.arb`: added a title for each of the 4 user queries * `app_fr.arb`: added a title for each of the 4 user queries * `paged_user_product_query.dart`: added smoothie fields to user queries * `product_list_page.dart`: refactored * `product_query_page_helper.dart`: refactored by removing useless code * `user_preferences_account.dart`: refactored and translated
) Impacted files: * `app_en.arb`: added a title for each of the 4 user queries * `app_fr.arb`: added a title for each of the 4 user queries * `paged_user_product_query.dart`: added smoothie fields to user queries * `product_list_page.dart`: refactored * `product_query_page_helper.dart`: refactored by removing useless code * `user_preferences_account.dart`: refactored and translated
Needs minor refactoring using the brand new off-dart 1.20.0 methods from openfoodfacts/openfoodfacts-dart#488. |
@teolemon @stephanegigandet Actually there's a little bug I've just discovered, on the server side. With the latest version of off-dart, we also put the language in the query. Which is a good idea, isn't it? It works well for the first 3 queries (contributor, informer, photographer).
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="/informateur/monsieurtanuki/etat/a-completer.json">here</a>.</p>
<hr>
<address>Apache/2.4.25 (Debian) Server at world.openfoodfacts.org Port 80</address>
</body></html> What shall we do? Should we handle that in off-dart? Is that a bad redirection code on the server side? |
@monsieurtanuki the best solution I have right now is using the States taxonomy: https://static.openfoodfacts.org/data/taxonomies/states.json |
Otherwise, the tags are stored in https://github.com/openfoodfacts/openfoodfacts-server/blob/e32683cdfdf05b9e83667efaa8494c0dd17e65b4/po/tags/fr.po and not in a structured form |
@teolemon What you suggest wouldn't be very elegant:
Actually, the keys seem to be
Another problem is the discrepancies in the number of "to-be-completed" products depending on the countries. What I can do for the moment is unset the language value for this specific query in Smoothie: we'll have the max number of results, and I hope not having the language as a parameter won't have side-effects. |
The problem is that we cannot really force the language to
|
@monsieurtanuki I'm fixing the redirect server side. But those kinds of URLs (adding .json to web site URLs to get the products) should not be used in the app, they are mostly for debugging purposes. We should use the search API instead, and there won't be redirects. |
Server side fix: openfoodfacts/openfoodfacts-server#7019 |
Thank you @stephanegigandet! |
Great, thank you! |
…h not English language Deleted file: * `tmp_to_be_completed_query_configuration.dart`: now included (and fixed) in off-dart 1.21.0 Impacted files: * `paged_to_be_completed_product_query.dart`: now uses off-dart 1.21.0 query instead of tmp * `Podfile.lock`: wtf * `pubspec.lock`: wtf * `pubspec.yaml`: upgraded off-dart version to 1.21.0
… language (#2521) Deleted file: * `tmp_to_be_completed_query_configuration.dart`: now included (and fixed) in off-dart 1.21.0 Impacted files: * `paged_to_be_completed_product_query.dart`: now uses off-dart 1.21.0 query instead of tmp * `Podfile.lock`: wtf * `pubspec.lock`: wtf * `pubspec.yaml`: upgraded off-dart version to 1.21.0
What
Mockup
The text was updated successfully, but these errors were encountered: