-
-
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
feat: 5195 - location search, as a preliminary step #5274
Merged
monsieurtanuki
merged 2 commits into
openfoodfacts:develop
from
monsieurtanuki:feat/5195
May 21, 2024
Merged
feat: 5195 - location search, as a preliminary step #5274
monsieurtanuki
merged 2 commits into
openfoodfacts:develop
from
monsieurtanuki:feat/5195
May 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New files: * `dao_osm_location.dart`: DAO about OSM locations. * `loading_status.dart`: Common loading status. * `location_list_supplier.dart`: Asynchronously loads locations. * `location_map_page.dart`: Page that displays a map centered on a location. * `location_query_model.dart`: Location query model. * `location_query_page.dart`: Page that displays location results during and after download. * `osm_location.dart`: Location as expected from OSM. * `product_loading_status.dart`: Product loading status. Refactored from `product_list_item_simple.dart` * `search_app_bar_title.dart`: Common search app bar title. * `search_empty_screen.dart`: Common search empty screen. * `search_helper.dart`: Common "text-field + history" search helper. * `search_loading_screen.dart`: Common search loading screen. * `search_location_helper.dart`: Search helper dedicated to location search. * `search_location_model.dart`: Search location model. * `search_location_preloaded_item.dart`: Location search preloaded list item, for locations historically selected. * `search_preloaded_item.dart`: Common search preloaded item. * `search_product_helper.dart`: Search helper dedicated to product search. Used to be in `search_page.dart` Impacted files * `app_en.arb`: added a "No location found" label * `app_fr.arb`: added a "No location found" label * `app_navigator.dart`: minor refactoring * `dao_string_list.dart`: history key for new feature "previous location searches" * `local_database.dart`: upgraded the version to take into account new class `DaoOsmLocation` * `personalized_ranking_model.dart`: now using a common `LoadingStatus` * `personalized_ranking_page.dart`: now using a common `LoadingStatus` * `product_list_item_simple.dart`: now using a common `ProductLoadingStatus` * `product_model.dart`: now using a common `ProductLoadingStatus` * `product_price_item.dart`: added unrelated TODO comment * `product_query_model.dart`: now using a common `LoadingStatus` * `product_query_page.dart`: now using common `SearchLoadingScreen`, `SearchEmptyScreen` and `SearchAppBarTitle` * `product_query_page_helper.dart`: removed useless `ProductQueryPageResult`; refactored `EditProductCallback` to `SearchQueryCallback` somewhere else * `search_history_view.dart`: refactored with `SearchHelper` and preloaded items * `search_page.dart`: refactored the actual search code to `SearchHelper`; added preloaded items; found a bug * `smooth_product_carousel.dart`: minor refactoring * `user_preferences_dev_mode.dart`: added a temporary access to location search; removed useless key
github-actions
bot
added
🥫 Product page
🤳🥫 Scan
We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
product scan carousel
labels
May 21, 2024
teolemon
approved these changes
May 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very promising 👌
Thank you very much @teolemon for your review! As I had to refactor the standard product search, don't hesitate to test it again. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Prices
🥫 Product page
product scan carousel
🤳🥫 Scan
We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Screenshots
The entry point is in the "dev mode" page: "Temporary access to location search".
Part of
Files
New files:
dao_osm_location.dart
: DAO about OSM locations.loading_status.dart
: Common loading status.location_list_supplier.dart
: Asynchronously loads locations.location_map_page.dart
: Page that displays a map centered on a location.location_query_model.dart
: Location query model.location_query_page.dart
: Page that displays location results during and after download.osm_location.dart
: Location as expected from OSM.product_loading_status.dart
: Product loading status. Refactored fromproduct_list_item_simple.dart
search_app_bar_title.dart
: Common search app bar title.search_empty_screen.dart
: Common search empty screen.search_helper.dart
: Common "text-field + history" search helper.search_loading_screen.dart
: Common search loading screen.search_location_helper.dart
: Search helper dedicated to location search.search_location_model.dart
: Search location model.search_location_preloaded_item.dart
: Location search preloaded list item, for locations historically selected.search_preloaded_item.dart
: Common search preloaded item.search_product_helper.dart
: Search helper dedicated to product search. Used to be insearch_page.dart
Impacted files
app_en.arb
: added a "No location found" labelapp_fr.arb
: added a "No location found" labelapp_navigator.dart
: minor refactoringdao_string_list.dart
: history key for new feature "previous location searches"local_database.dart
: upgraded the version to take into account new classDaoOsmLocation
personalized_ranking_model.dart
: now using a commonLoadingStatus
personalized_ranking_page.dart
: now using a commonLoadingStatus
product_list_item_simple.dart
: now using a commonProductLoadingStatus
product_model.dart
: now using a commonProductLoadingStatus
product_price_item.dart
: added unrelated TODO commentproduct_query_model.dart
: now using a commonLoadingStatus
product_query_page.dart
: now using commonSearchLoadingScreen
,SearchEmptyScreen
andSearchAppBarTitle
product_query_page_helper.dart
: removed uselessProductQueryPageResult
; refactoredEditProductCallback
toSearchQueryCallback
somewhere elsesearch_history_view.dart
: refactored withSearchHelper
and preloaded itemssearch_page.dart
: refactored the actual search code toSearchHelper
; added preloaded items; found a bugsmooth_product_carousel.dart
: minor refactoringuser_preferences_dev_mode.dart
: added a temporary access to location search; removed useless key