* Improvements for the photo gallery (and many many other changes)
* Make the indicator white (temporary?)
---------
Co-authored-by: Edouard Marquez <edouard@marquez.cool>
Impacted files:
* `image_crop_page.dart`: now we can force the image source
* `price_model.dart`: now we can set a proof after init time
* `price_proof_card.dart`: now we can select the proof image among "camera", "gallery" and "my proofs"; minor refactoring
* `prices_proofs_page.dart`: added a "select proof?" parameter to pop the selected proof if needed
* `user_preferences_account.dart`: minor refactoring
Impacted files:
* `add_basic_details_page.dart`: added product type
* `add_new_product_page.dart`: added a "set product type page" for new products; added product type; minor refactoring
* `add_other_details_page.dart`: added product type
* `app_en.arb`: added 1 label per product type, and 4 labels for product type input
* `background_task_barcode.dart`: added product type
* `background_task_crop.dart`: added product type
* `background_task_details.dart`: added product type
* `background_task_hunger_games.dart`: added product type
* `background_task_image.dart`: added product type
* `background_task_refresh_later.dart`: added product type
* `background_task_unselect.dart`: added product type
* `background_task_upload.dart`: added product type
* `edit_new_packagings.dart`: added product type
* `edit_ocr_page.dart`: added product type
* `image_crop_page.dart`: added product type
* `nutrition_page_loaded.dart`: added product type
* `product_crop_helper.dart`: added product type
* `product_dialog_helper.dart`: removed irrelevant nutriscore and ecoscore logos for new found products, as we cannot say already if it's food
* `product_image_button.dart`: added product type
* `product_image_carousel_item.dart`: added product type
* `product_image_crop_button.dart`: added product type
* `product_image_gallery_view.dart`: added product type
* `product_image_local_button.dart`: added product type
* `product_image_unselect_button.dart`: added product type
* `product_image_viewer.dart`: added product type
* `product_query.dart`: localized labels for product type
* `simple_input_page.dart`: added product type
* `simple_input_page_helpers.dart`: added product type
* `up_to_date_changes.dart`: added product type
* `uploaded_image_gallery.dart`: added product type
* feat: 5301 - price proofs can be cropped and will be displayed
New files:
* `crop_helper.dart`: Crop Helper for images in crop page: process to run when cropping an image.
* `crop_parameters.dart`: Parameters of the crop operation.
* `product_crop_helper.dart`: Crop Helpers for product images.
* `proof_crop_helper.dart`: Crop Helper for proof images.
Impacted files
* `add_new_product_page.dart`: minor refactoring
* `background_task.dart`: new method `isDeduplicable`
* `background_task_add_price.dart`:
* `background_task_image.dart`: made some methods `static` and public to be reused
* `background_task_manager.dart`: now using new method `isDeduplicable`
* `background_task_upload.dart`: new method `isDeduplicable`
* `crop_page.dart`: refactored using `CropHelper`
* `image_crop_page.dart`: minor refactoring
* `may_exit_page_helper.dart`: minor refactoring
* `price_model.dart`: minor refactoring
* `price_proof_card.dart`: now we may crop the image and we also display the result
* `product_image_crop_button.dart`: refactored using `CropHelper`
* `uploaded_image_gallery.dart`: minor refactoring
* feat: 5301 - fixed WillPopScope2
Impacted files
* `crop_page.dart`: fixed `WillPopScope2`
* `product_price_add_page.dart`: added a `TODO`
* `price_proof_card.dart`: minor refactoring
* Unrelated - fixed `getUrl` bug (was always PROD, never TEST)
New file:
* `signalconso.png`: new asset
Impacted files
* `product_cards_helper.dart`: fixed `getUrl` bug (was always PROD, never TEST)
* `product_image_crop_button.dart`: fixed `getUrl` bug (was always PROD, never TEST)
* `product_image_gallery_other_view.dart`: fixed `getUrl` bug (was always PROD, never TEST)
* `product_image_other_page.dart`: fixed `getUrl` bug (was always PROD, never TEST)
* `uploaded_image_gallery.dart`: fixed `getUrl` bug (was always PROD, never TEST)
* feat: 5195 - new "add one product price" page with background task
New files:
* `background_task_add_price.dart`: Background task about adding a product price.
* `currency_selector_helper.dart`: Helper for currency selection.
* `price_amount_card.dart`: Card that displays the amounts (discounted or not) for price adding.
* `price_amount_field.dart`: Text field that displays a single amount for price adding.
* `price_currency_card.dart`: Card that displays the currency for price adding.
* `price_currency_selector.dart`: Button that displays the currency for price adding.
* `price_date_card.dart`: Card that displays the date for price adding.
* `price_location_card.dart`: Card that displays the location for price adding.
* `price_model.dart`: Price Model (checks and background task call) for price adding.
* `price_proof_card.dart`: Card that displays the proof for price adding.
* `product_price_add_page.dart`: Single page that displays all the elements of price adding.
Impacted files:
* `app_en.arb`: added labels related to price adding
* `app_fr.arb`: added labels related to price adding
* `background_task_crop.dart`: minor refactoring
* `background_task_image.dart`: minor refactoring
* `background_task_upload.dart`: minor refactoring
* `currency_selector.dart`: refactored with new class `CurrencySelectorHelper`
* `dao_osm_location.dart`: minor refactoring
* `image_crop_page.dart`: minor refactoring
* `location_list_supplier.dart`: minor refactoring
* `location_map_page.dart`: added action buttons for location description and location confirmation
* `operation_type.dart`: added data for new class `BackgroundTaskAddPrice`
* `prices_card.dart`: now opening new page `ProductPriceAddPage`
* `product_price_item.dart`: minor improvement
* `product_prices_page.dart`: minor improvement
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded `openfoodfacts` to `3.10.0`
* `search_location_preloaded_item.dart`: now enabling the map page to confirm a location
* fine-tuning
Impacted files:
* `app_en.arb`: added labels related to prices
* `app_fr.arb`: added labels related to prices
* `edit_product_page.dart`: added a link to "Add product price" page
* `prices_card.dart`: refactoring
* `product_price_add_page.dart`: fixed the FAB label; refactored the access using a static method
* `product_price_item.dart`: now displaying the not discounted price; refactored
* `product_prices_list.dart`: localized
* `product_prices_page.dart`: added a FAB to "Add product price" page
* fix: 1815 - around context.mounted
The PR is about two related topics:
* Removing all the `ignore: use_build_context_synchronously`
* Replacing all the `State<StatefulWidget> widget` by `BuildContext context`, now that it's possible in flutter
* Update packages/smooth_app/lib/pages/onboarding/permissions_page.dart
* format fix
* feat: 3919 - select languages for new product images
New file:
* `add_new_product_helper.dart`: Helper classes for `AddNewProductPage` that was getting too big.
Impacted files:
* `add_basic_details_page.dart`: minor refactoring
* `add_new_product_page.dart`: moved code to new file `add_new_product_helper.dart`; refactored the trackers with new class `AnalyticsProductTracker`; refactored the access to image edit
* `add_simple_input_button.dart`: minor refactoring
* `crop_page.dart`: minor refactoring
* `edit_new_packagings.dart`: minor refactoring
* `edit_ocr_page.dart`: minor refactoring
* `edit_product_page.dart`: minor refactoring
* `image_crop_page.dart`: minor refactoring
* `image_field_extension.dart`: minor refactoring
* `nutrition_page_loaded.dart`: minor refactoring
* `product_cards_helper.dart`: minor refactoring
* `product_field_editor.dart`: minor refactoring
* `product_image_carousel.dart`: minor refactoring
* `product_image_carousel_item.dart`: renamed from `image_upload_card.dart`
* `product_image_gallery_view.dart`: minor refactoring
* `product_image_local_button.dart`: minor refactoring
* `product_image_server_button.dart`: minor refactoring
* `product_image_swipeable_view.dart`: minor refactoring
* `product_image_viewer.dart`: minor refactoring
* `product_refresher.dart`: minor refactoring
* `uploaded_image_gallery.dart`: minor refactoring
* feat: 3919 - merge conflict fixes
* feat: 3919 - conflict fix
---------
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
* App review in the "scan card"
* Add a keep alive to prevent many requests
* Add a missing call to super (for the KeepAlive mixin)
* Don't really understand what happened with this file 🤨
* feat: 3765 - now using the "crop_image" package
Deleted files:
* `crop_grid.dart`
* `rotated_crop_controller.dart`
* `rotated_crop_image.dart`
* `rotation.dart`
Impacted files:
* `background_task_image.dart`: minor refactoring
* `crop_page.dart`: renamed and moved; now using the `crop_image` package
* `image_compute_container.dart`: renamed and moved; refactored
* `image_crop_page.dart`: minor refactoring
* `product_image_viewer.dart`: minor refactoring
* `pubspec.lock`: wtf
* `pubspec.yaml`: added `crop_image`, upgraded `image` and related packages
* `uploaded_image_gallery.dart`: minor refactoring
* feat: 3765 - now using the CropController.getCroppedBitmap method
Impacted files:
* `background_task_image.dart`: minor refactoring
* `image_compute_container.dart`: removed code that is now in `CropController`
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded `crop_image`
* feat: 3897 - no language selector for gallery, only for swipeable page
Main changes:
* `app_en.arb`: added 2 translations ("no image" / "no image for that language")
* `app_fr.arb`: added 2 translations ("no image" / "no image for that language")
* `nutrition_page_loaded.dart`: removed an implicit `language` parameter
* `product_cards_helper.dart`: refactoring
* `product_image_gallery_view.dart`: removed the language selector
* `product_image_swipeable_view.dart`: removed the language parameter; now we always start with the app language
* `product_image_viewer.dart`: now always displays the (non) image for the specified language, with additional labels; added explicit `language` parameters
* `transient_file.dart`: new method `getImageLanguages`
Added explicit `language` parameters for:
* `add_new_product_page.dart`: added an explicit `language` parameter
* `background_task_crop.dart`: added an explicit `language` parameter
* `background_task_image.dart`: added an explicit `language` parameter
* `background_task_unselect.dart`: added an explicit `language` parameter
* `edit_ingredients_page.dart`: added an explicit `language` parameter
* `edit_new_packagings.dart`: added an explicit `language` parameter
* `image_crop_page.dart`: added an explicit `language` parameter
* `image_upload_card.dart`: added an explicit `language` parameter
* `new_crop_page.dart`: added an explicit `language` parameter
* `product_image_local_button.dart`: added an explicit `language` parameter
* `product_image_server_button.dart`: added an explicit `language` parameter
* `uploaded_image_gallery.dart`: added an explicit `language` parameter
* feat: 3897 - slightly related refactoring around ImageFieldSmoothieExtension
* feat: 3897 - minor fix for TEST env
* feat: 3656 - privacy compliance for cropped new images
Impacted files:
* `background_task_image.dart`: now we crop here the image before sending it
* `new_crop_page.dart`: now we either let the server crop (old image) or let the background task crop (brand new image)
* `rotated_crop_controller.dart`: refactored adding a static method `getCroppedBitmap`
* feat: 3656 - bug fix - server gallery images should be considered as new images
Impacted files:
* `image_crop_page.dart`: minor refactoring
* `new_crop_page.dart`: minor refactoring
* `product_image_viewer.dart`: minor refactoring
* `uploaded_image_gallery.dart`: bug fix - we should consider that it's a new image
* feat: 2424 - new "select existing image" button
New files:
* `background_task_crop.dart`: Background task about product image crop from existing file.
* `uploaded_image_gallery.dart`: Gallery of all images already uploaded, about a given product.
Delete file:
* `smooth_images_sliver_grid.dart`
Impacted files:
* `abstract_background_task.dart`: added reference to "crop" task
* `app_en.arb`: added 4 labels about "existing images" (button, page title, downloading, nothing found)
* `image_crop_page.dart`: refactored moving code here from `ProductImageViewer`
* `new_crop_page.dart`: now we can handle "already existing" images, in addition to the current choice for e.g. NUTRITION_FR
* `operation_type.dart`: added reference to new "crop" task
* `product_image_swipeable_view.dart`: unrelated fix - the title of the first reached page was always the title of the first page to the left
* `product_image_viewer.dart`: added a "select existing image" button; moved code to `image_crop_page.dart`
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded off-dart in order to user new methods
* feat: 2424 - upgraded to off-dart 2.2.0
Impacted files:
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded off-dart in order to user new methods
Impacted files:
* `image_crop_page.dart`: told the `CropPage` we're dealing with a brand new picture
* `new_crop_page.dart`: new `bool` parameter `brandNewPicture` used when saving the picture; refactored the debug lines
* `product_image_viewer.dart`: told the `CropPage` we're dealing with an already existing picture
* feat: 3332 - refactor the new crop page UI and added a camera
New file:
* `may_exit_page_helper.dart`: Helper class about the "You're leaving the page with unsaved changes" case.
Impacted files:
* `image_crop_page.dart`: made method `pickImageFile` public
* `new_crop_image.dart`: added "camera" button to app bar, moved "rotate" button on app bar, moved "ok" button as FAB, added "exit without saving" dialog feature
* `simple_input_page.dart`: now using new class `MayExitPageHelper`
* feat: 3332 - after review
Impacted file:
* `new_crop_image.dart`: moved "camera" button to bottom center, moved "rotate" button to top right, removed "ok" button
* feat: 3332 - refactored the new crop tool UI; removed the old crop tool
Impacted files:
* `crop_helper.dart`: removed the old crop tool
* `image_crop_page.dart`: removed the old crop tool
* `new_crop_page.dart`: added a "rotate left" button; added a "confirm" button; refactored
* `Podfile.lock`: wtf
* `pubspec.lock`: wtf
* `pubspec.yaml`: removed the old crop tool
* `rotated_crop_controller.dart`: added a "rotate left" method
* `rotation.dart`: added a "rotate left" method
* `user_preferences_dev_mode.dart`: removed the choice of "old crop tool"
* feat: 3332 - simplified the image edit process removing one step
Deleted files:
* `confirm_and_upload_picture.dart`
* `crop_helper.dart`
Impacted files:
* `image_crop_page.dart`: simplified with fewer steps
* `new_crop_page.dart`: now uploads
* `product_image_viewer.dart`: minor refactoring - going directly to `CropPage`
* feat: 3332 - crop page title now reflects image field
Impacted files:
* `confirm_and_upload_picture.dart`: minor refactoring
* `crop_helper.dart`: added a `pageTitle` parameter
* `edit_ingredients_page.dart`: minor refactoring
* `image_crop_page.dart`: added `imageField` parameters, so that we can compute the correct label on crop page
* `image_upload_card.dart`: now we explicitly use `getProductImageButtonText` as label
* `new_crop_page.dart`: added a page title parameter
* `product_cards_helper.dart`: new label method `getImagePageTitle`; minor refactoring
* `product_image_carousel.dart`: minor refactoring
* `product_image_data.dart`: removed label fields - now we have more flexibility, computing labels from `imageField` with `product_cards_helper.dart` methods
* `product_image_gallery_view.dart`: minor refactoring
* `product_image_swipeable_view.dart`: now we explicitly use `getImagePageTitle` as label
* `product_image_viewer.dart`: minor refactoring
* `smooth_images_sliver_list.dart`: now we explicitly use `getProductImageTitle` as label
* `smooth_product_image.dart`: minor refactoring
* feat: 3332 - 2 lines for the title
Impacted files:
* `new_crop_page.dart`: 2 lines for the title
Co-authored-by: Aman Raj <57723319+AshAman999@users.noreply.github.com>
New files:
* `ocr_widget.dart`: Widget dedicated to OCR, with 3 actions: upload image, extract data, save. Used to be in `edit_ingredients_page.dart`
* `transient_file.dart`: Helper class about transient files (= not fully uploaded yet).
Impacted files:
* `add_basic_details_page.dart`: minor refactoring
* `add_new_product_page.dart`: refactored around the class image repository
* `app_en.arb`: added 1 label when OCR fails
* `app_fr.arb`: added 1 label when OCR fails
* `background_task_details.dart`: minor refactoring
* `background_task_image.dart`: immediate execution with just one try
* `confirm_and_upload_picture.dart`: minor refactoring with new private class `_OutlinedButton`
* `edit_ingredients_page.dart`: moved `OcrWidget` code to dedicated new dart file; fixed the extract button - that cannot be reached if the image is not uploaded yet
* `image_crop_page.dart`: refactored with more explicit method names
* `image_upload_card.dart`: refactored with `TransientFile`
* `new_product_page.dart`: minor refactoring
* `product_cards_helper.dart`: minor refactoring
* `product_image_carousel.dart`: minor refactoring
* `product_image_gallery_view.dart`: refactored with new method `confirmAndUploadNewPicture` and new class `TransientFile`
* `product_image_viewer.dart`: refactored with new class `TransientFile`
* `question_card.dart`: minor refactoring
* `smooth_product_image.dart`: refactored with new class `TransientFile`
Deleted file:
* `picture_capture_helper.dart`: moved code to `ConfirmAndUploadPicture`, that is now the only place where we upload images
Impacted files:
* `add_new_product_page.dart`: minor refactoring
* `background_task_details.dart`: minor refactoring
* `background_task_image.dart`: minor refactoring
* `confirm_and_upload_picture.dart`: minor refactoring; moved here code from `picture_capture_helper.dart`
* `edit_ingredients_page.dart`: replaced `uploadCapturedPicture` with a call to page `ConfirmAndUploadPicture`
* `image_crop_page.dart`: refactored into a single `startImageCropping` method
* `image_upload_page.dart`: replaced `uploadCapturedPicture` with a call to page `ConfirmAndUploadPicture`
* `new_crop_page.dart`: minor refactoring
* `product_image_gallery_view.dart`: replaced `uploadCapturedPicture` with a call to page `ConfirmAndUploadPicture`; refactoring around refresh
* `product_image_viewer.dart`: minor refactoring
* `up_to_date_product_provider.dart: removed old-fashioned code
Impacted files:
* `app_en.arb`: added 2 related labels
* `app_fr.arb`: added 2 related labels
* `add_new_product_page.dart`: refactored the call to `startImageCropping`
* `confirm_and_upload_picture.dart`: refactored the call to `startImageCropping`; removed the code that also asked for the gallery/camera choice
* `edit_ingredients_page.dart`: refactored the call to `startImageCropping`
* `image_crop_page.dart`: simplified and upgraded methods `pickImageFile` and `startImageCropping`; added a method to select the best picture source
* `image_upload_card.dart`: refactored the call to `startImageCropping`
* `product_image_gallery_view.dart`: refactored the call to `startImageCropping`
* `user_preferences.dart`: added `enum`, getter, setter for the picture source
* `user_preferences_settings.dart`: added a choice for camera/gallery/select; fixed a possible overflow with "dark mode"
New files:
* `crop_grid.dart`: heavily inspired from package `crop_image` - ideally we should put it back there.
* `crop_helper.dart`: Crop Helper - which crop tool do we use, and the method to use it.
* `new_crop_page.dart`: Page dedicated to image cropping. Pops the resulting file path if relevant.
* `rotated_crop_controller.dart`: heavily inspired from package `crop_image` BUT with the rotation feature - ideally we should put it back there.
* `rotated_crop_image.dart`: heavily inspired from package `crop_image` BUT with the rotation feature - ideally we should put it back there.
* `rotation.dart`: 90 degree rotations - ideally we should put it back in package `crop_image`
Impacted files:
* `image_crop_page.dart`: now relying on new class `CropHelper` in order to get the appropriate crop tool (e.g. old or new)
* `pubspec.lock`: wtf
* `pubspec.yaml`: added package `image` for good performances regarding image encoding
* `user_preferences_dev_mode.dart`: added a "Use new crop tool" switch (default is `false`)
* Make the product page action row top aligned solved
* fix: image not croped
* fix: Sign up form: different font styles
* flutter formet
Co-authored-by: Macbook Pro <mac@macbooks-mbp.home>
Co-authored-by: Macbook Pro <mac@Macbooks-MacBook-Pro.local>
* take images from camera as well + translations
* overflow fix on alert dialog buttons
* hide dialog for selection where already more
* translation and alignment
* formatted the code
* Removed comment
* Update pubspec.lock
* Missing import
Co-authored-by: Marvin Möltgen <39344769+M123-dev@users.noreply.github.com>
* feat: Update to new color scheme
* Update goldens
* Update packages/smooth_app/lib/themes/smooth_theme.dart
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
* Updated to new smaller color scheme
* Updated Goldens
* Some minor fixes
* Update pubspec.lock
* Update goldens
* Next fixes
* fix login page
* More fixes
* Even more fixes
* latest fixes with pierre
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
* handle errors in cropper
* retaken photo delete after it's work is done
* ran flutter format
* handle errors in cropper
* retaken photo delete after it's work is done
* ran flutter format
* added image_cropper package to depencency
* added the required changes to manifest.xml file
* working new cropper added
* styled the crop tool with the theme
* fine tune dark theme on crop tool
* removed unused dependencies
Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>