-
-
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 by default unranked search results (for 25 first results of the query, with more loading on scroll) #1333
Comments
Currently
Probable changes
|
I would only make it manual in a potential power-saving mode, otherwise I would autoload like we did in V1. |
I understand. |
I should be able to PR on Thursday. |
New files: * `paged_product_query.dart`: Paged product query (with pageSize and pageNumber). * `partial_product_list.dart`: List of Products out of partial results (e.g. paged results). Impacted files: * `category_product_query.dart`: now extending new class `PagedProductQuery`. * `dao_product_list.dart`: now storing "total size" of paged results; now including page size and page number in the primary key; now returning a bool for method `delete`. * `database_product_list_supplier.dart`: now loads paged results page after page. * `keywords_product_query.dart`: now extending new class `PagedProductQuery`. * `new_product_page.dart`: unrelated fix about back icon on Android/iOS. * `onboarding_flow_navigator.dart`: unrelated fix about back icon on Android/iOS. * `personalized_ranking_page.dart`: refactoring. * `product_list.dart`: removed now unused product list type (pnns); added fields page size, page number and total size for paged results; refactored. * `product_list_page.dart`: refactored. * `product_list_supplier.dart`: now using `PagedProductQuery` and `PartialProductList`. * `product_query_model.dart`: added a `clear` method to go back to top page; added method `loadNextPage` and `loadFromTop`. * `product_query_page.dart`: now displaying pages results with a "load next" button; unrelated fix about back icon on Android/iOS. * `product_query_page_helper.dart`: refactored. * `query_product_list_supplier.dart`: now using `PagedProductQuery`. * `scan_page_helper.dart`: refactored. * `search_page.dart`: refactored. * `summary_card.dart`: refactored.
Impacted file: * `product_query_page.dart`
Impacted file: * `product_query_page.dart`
Impacted files: * `dao_product_list.dart`: added explicit constant * `database_product_list_supplier.dart`: added comments * `Podfile.lock`: wtf * `product_query_model.dart`: now returning relevant `bool` for async loads * `product_query_page.dart`: minor refactoring
New files: * `paged_product_query.dart`: Paged product query (with pageSize and pageNumber). * `partial_product_list.dart`: List of Products out of partial results (e.g. paged results). Impacted files: * `category_product_query.dart`: now extending new class `PagedProductQuery`. * `dao_product_list.dart`: now storing "total size" of paged results; now including page size and page number in the primary key; now returning a bool for method `delete`. * `database_product_list_supplier.dart`: now loads paged results page after page. * `keywords_product_query.dart`: now extending new class `PagedProductQuery`. * `new_product_page.dart`: unrelated fix about back icon on Android/iOS. * `onboarding_flow_navigator.dart`: unrelated fix about back icon on Android/iOS. * `personalized_ranking_page.dart`: refactoring. * `Podfile.lock`: wtf * `product_list.dart`: removed now unused product list type (pnns); added fields page size, page number and total size for paged results; refactored. * `product_list_page.dart`: refactored. * `product_list_supplier.dart`: now using `PagedProductQuery` and `PartialProductList`. * `product_query_model.dart`: added a `clear` method to go back to top page; added method `loadNextPage` and `loadFromTop`. * `product_query_page.dart`: now displaying pages results with a "load next" button; unrelated fix about back icon on Android/iOS. * `product_query_page_helper.dart`: refactored. * `query_product_list_supplier.dart`: now using `PagedProductQuery`. * `scan_page_helper.dart`: refactored. * `search_page.dart`: refactored. * `summary_card.dart`: refactored.
From #1326 (I could not create an issue directly from it)
Show by default unranked search results (for 25 first results of the query, with more loading on scroll, with just : https://fr.openfoodfacts.org/cgi/search.pl?search_terms=salmon&action=process&fields=brands,product_name,image_small_url,image_front_thumb_url,quantity,nutrition_grades_tags,ecoscore_tags&json=1&page_size=25
What we do on Android is infinite scroll by loading in batches of 25 or 50. So if the user starts scrolling, we load additional batches of 25.
We can choose to store (or not) those search results for later loading (they are lightweight, and fast to get again, so either option is ok)
Part of
The text was updated successfully, but these errors were encountered: