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

feat: 2427 - added "unselect image" button #3618

Merged
merged 1 commit into from Jan 23, 2023

Conversation

monsieurtanuki
Copy link
Contributor

New files:

  • background_task_unselect.dart: Background task about unselecting a product image.
  • edit_image_button.dart: Standard text button for the "edit image" pages. Used to be in NewCropPage as _OutlinedButton.

Impacted files:

  • abstract_background_task.dart: added new "unselect" task
  • app_en.arb: added a label for the "unselect image" button
  • background_task_manager.dart: unrelated minor fix
  • new_crop_page.dart: moved _OutlinedButton code to new file edit_image_button.dart
  • offline_tasks_page.dart: moved code to OperationType
  • operation_type.dart: new enum for "unselect"; new method getLabel
  • product_image_viewer.dart: changed the layout in order to add the "unselect image" button
  • up_to_date_changes.dart: included the new "unselect" type to product changes

What

  • Added the "unselect image" button to the product image page.
  • This means a new background task, with apparent immediate result.

Screenshot

new button with image no button when no image
Capture d’écran 2023-01-23 à 11 38 36 Capture d’écran 2023-01-23 à 11 38 52

Fixes bug(s)

Part of

New files:
* `background_task_unselect.dart`: Background task about unselecting a product image.
* `edit_image_button.dart`: Standard text button for the "edit image" pages. Used to be in `NewCropPage` as `_OutlinedButton`.

Impacted files:
* `abstract_background_task.dart`: added new "unselect" task
* `app_en.arb`: added a label for the "unselect image" button
* `background_task_manager.dart`: unrelated minor fix
* `new_crop_page.dart`: moved `_OutlinedButton` code to new file `edit_image_button.dart`
* `offline_tasks_page.dart`: moved code to `OperationType`
* `operation_type.dart`: new `enum` for "unselect"; new method `getLabel`
* `product_image_viewer.dart`: changed the layout in order to add the "unselect image" button
* `up_to_date_changes.dart`: included the new "unselect" type to product changes
Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM feature wise 👍

@monsieurtanuki monsieurtanuki merged commit 153c53a into openfoodfacts:develop Jan 23, 2023
@monsieurtanuki
Copy link
Contributor Author

@teolemon Thank you for your review!
What about an "are you sure?" dialog when the user clicks on "unselect photo"?

@teolemon
Copy link
Member

Sound ok.

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

Successfully merging this pull request may close these issues.

Add image unselect in the expanded view accessible from the carousel
2 participants