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

Allow to expand search results to the world #2339

Closed
1 task
Tracked by #2318
teolemon opened this issue Jun 20, 2022 · 4 comments · Fixed by #2718
Closed
1 task
Tracked by #2318

Allow to expand search results to the world #2339

teolemon opened this issue Jun 20, 2022 · 4 comments · Fixed by #2718
Assignees
Milestone

Comments

@teolemon
Copy link
Member

teolemon commented Jun 20, 2022

What

  • Allow to expand search results to the world

Part of

@monsieurtanuki
Copy link
Contributor

Where should we allow to expand the search results to the world? (= no country specified I guess)

  • at the app level, in preferences?
  • just before each search?
  • just after each search, like the current "do you want to refresh your data / to load the next page"?

@teolemon
Copy link
Member Author

Sorry, opened it during triage. Probably on top of search results, have an inline link: Extend this search worldwide.
This is useful in countries where we don't have many products at all

@monsieurtanuki
Copy link
Contributor

The first step would be to add a 'country' parameter in the ProductList / search database key.

@teolemon teolemon added this to the V1.1 milestone Jun 23, 2022
@monsieurtanuki monsieurtanuki self-assigned this Jun 27, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Jul 1, 2022
…t list keys

What:
* added language and country to query product list keys
* that means that if I run a query for "pizza", not only the results will be different depending on the language and country (that was already the case), but the results will be cached accordingly - if I change language or country, I will see the cached results for those new language/country, not the results of the same query but with different language/country
* we needed that improvement in order to display correctly the "world" results; that was the first step
* also moved all the "query" classes to a specific folder
* fun fact: there are more "pizza"s in France than in Italy

Impacted files:
* `abstract_onboarding_data.dart`: minor refactoring
* `barcode_product_query.dart`: moved; minor refactoring
* `category_product_query.dart`: moved; added language and country to product list key
* `continuous_scan_model.dart`: minor refactoring
* `country_selector.dart`: minor refactoring
* `database_product_list_supplier.dart`: minor refactoring
* `keywords_product_query.dart`: moved; added language and country to product list key
* `main.dart`: minor refactoring
* `new_product_page.dart`: minor refactoring
* `nutrition_page_loaded.dart`: minor refactoring
* `ocr_helper.dart`: minor refactoring
* `onboarding_data_product.dart`: minor refactoring
* `ordered_nutrients_cache.dart`: minor refactoring
* `paged_product_query.dart`: moved; added language and country to product list key; refactored around `getProducts`
* `paged_search_product_query.dart`: moved; refactored
* `paged_to_be_completed_product_query.dart`: moved; added language and country to product list key; refactored
* `paged_user_product_query.dart`: moved; added language to product list key; refactored
* `picture_capture_helper.dart`: minor refactoring
* `product_dialog_helper.dart`: minor refactoring
* `product_list.dart`: added optional language and country to constructor parameters
* `product_list_import_export.dart`: minor refactoring
* `product_list_page.dart`: minor refactoring
* `product_list_supplier.dart`: minor refactoring
* `product_query.dart`: moved; not an interface anymore
* `product_query_model.dart`: minor refactoring
* `product_query_page_helper.dart`: minor refactoring
* `product_refresher.dart`: minor refactoring
* `query_product_list_supplier.dart`: minor refactoring
* `robotoff_insight_helper.dart`: minor refactoring
* `robotoff_questions_query.dart`: moved; minor refactoring
* `search_page.dart`: minor refactoring
* `simple_input_page_helpers.dart`: minor refactoring
* `summary_card.dart`: minor refactoring
* `user_preferences_account.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
monsieurtanuki added a commit that referenced this issue Jul 2, 2022
…2465)

What:
* added language and country to query product list keys
* that means that if I run a query for "pizza", not only the results will be different depending on the language and country (that was already the case), but the results will be cached accordingly - if I change language or country, I will see the cached results for those new language/country, not the results of the same query but with different language/country
* we needed that improvement in order to display correctly the "world" results; that was the first step
* also moved all the "query" classes to a specific folder
* fun fact: there are more "pizza"s in France than in Italy

Impacted files:
* `abstract_onboarding_data.dart`: minor refactoring
* `barcode_product_query.dart`: moved; minor refactoring
* `category_product_query.dart`: moved; added language and country to product list key
* `continuous_scan_model.dart`: minor refactoring
* `country_selector.dart`: minor refactoring
* `database_product_list_supplier.dart`: minor refactoring
* `keywords_product_query.dart`: moved; added language and country to product list key
* `main.dart`: minor refactoring
* `new_product_page.dart`: minor refactoring
* `nutrition_page_loaded.dart`: minor refactoring
* `ocr_helper.dart`: minor refactoring
* `onboarding_data_product.dart`: minor refactoring
* `ordered_nutrients_cache.dart`: minor refactoring
* `paged_product_query.dart`: moved; added language and country to product list key; refactored around `getProducts`
* `paged_search_product_query.dart`: moved; refactored
* `paged_to_be_completed_product_query.dart`: moved; added language and country to product list key; refactored
* `paged_user_product_query.dart`: moved; added language to product list key; refactored
* `picture_capture_helper.dart`: minor refactoring
* `product_dialog_helper.dart`: minor refactoring
* `product_list.dart`: added optional language and country to constructor parameters
* `product_list_import_export.dart`: minor refactoring
* `product_list_page.dart`: minor refactoring
* `product_list_supplier.dart`: minor refactoring
* `product_query.dart`: moved; not an interface anymore
* `product_query_model.dart`: minor refactoring
* `product_query_page_helper.dart`: minor refactoring
* `product_refresher.dart`: minor refactoring
* `query_product_list_supplier.dart`: minor refactoring
* `robotoff_insight_helper.dart`: minor refactoring
* `robotoff_questions_query.dart`: moved; minor refactoring
* `search_page.dart`: minor refactoring
* `simple_input_page_helpers.dart`: minor refactoring
* `summary_card.dart`: minor refactoring
* `user_preferences_account.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
@monsieurtanuki
Copy link
Contributor

The first step would be to add a 'country' parameter in the ProductList / search database key.

Done in #2465.

Currently playing with MaterialBanner instead of SnackBar:

Capture d’écran 2022-08-01 à 11 11 47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants