10 Commits

Author SHA1 Message Date
e3bc40fdf3 chore: Migration to Dart 3.8 (#6668)
* Migration to Dart 3.8

* New GA

* Fix dartdoc
2025-06-23 18:14:17 +02:00
dda75e283e feat: Flutter 3.32 (#6665)
* Migration to Flutter 3.32

* Temporary ignore dart formatter issues
2025-06-23 09:56:00 +02:00
5a88d11396 feat: 6289 - faster bulk proof upload without cropping (#6486)
* feat: 6289 - faster bulk proof upload without cropping

New file:
* `price_bulk_proof_card.dart`: Card that displays the bulk proof button for price adding.

Impacted files:
* `crop_helper.dart`: minor refactoring
* `crop_page.dart`: minor refactoring
* `crop_parameters.dart`: minor refactoring
* `eraser_model.dart`: minor refactoring
* `price_proof_card.dart`: minor refactoring
* `proof_bulk_add_page.dart`: simplified by removing the FAB and using new widget `PriceBulkProofCard`

* added warning

* added l10n
2025-04-13 12:29:50 +02:00
d1324dfabe feat: 6104 - "eraser" feature for new images of "product" products (#6388)
Impacted files:
* `background_task_add_price.dart`: minor refactoring
* `background_task_image.dart`: added `eraserCoordinates` field; moved here code about "eraser overlayPainter"
* `crop_helper.dart`: new methods `getEraserCoordinates` and `getOffsets`; minor refactoring
* `product_crop_helper.dart`: added "eraser" for "ProductType.product" only; minor refactoring
* `proof_crop_helper.dart`: minor refactoring
2025-02-22 21:25:50 +01:00
036bda1fec feat: 5301 - added an erasing tool for proofs (#5341)
New files:
* `eraser_model.dart`: Model about the eraser tool: coordinate computations.
* `eraser_painter.dart`:  Painter of the eraser tool: displaying thick lines.

Impacted files:
* `background_task_add_price.dart`: displaying the eraser bars if relevant; new `eraserCoordinates` field
* `background_task_image.dart`: minor refactoring
* `crop_helper.dart`: new `enableEraser` field `offsets` parameters
* `crop_page.dart`: added an erasing tool for proofs; refactored
* `crop_parameters.dart`: new `eraserCoordinates` parameter
* `operation_type.dart` unrelated minor refactoring
* `product_crop_helper.dart`: minor refactoring
* `product_price_item.dart`: unrelated fix for TEST env
* `proof_crop_helper.dart`: minor refactoring
* `pubspec.lock`: wtf
* `pubspec.yaml`: needed upgrade of `crop_image` to `1.0.13`
2024-06-07 09:22:22 +02:00
529fe8f5e1 feat: 5301 - price proofs can be cropped and will be displayed (#5305)
* 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)
2024-05-30 14:34:35 +02:00
d3aea55ce2 feat: 3332 - refactored the new crop page UI and added a camera (#3402)
* 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`
2022-12-08 19:09:37 +01:00
8831337a21 feat: 3332 - crop page title now reflects image field (#3366)
* 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>
2022-11-28 20:39:22 +01:00
11e2ee414c fix: make new crop tool default (#3106)
* make new crop tool

* code suggested in review
2022-10-08 17:46:28 +02:00
535cddc2a9 fix: #1538 - new crop tool (cf. dev mode) (#2872)
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`)
2022-09-07 19:49:05 +02:00