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

fix: 4176 - border for some edit image buttons #4218

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

monsieurtanuki
Copy link
Contributor

What

Now in the OCR pages

  • when no image was downloaded before for that product, we do not display the "select an existing picture" button, as it has no sense.
  • we add a border for the image buttons for a better contrast with the background
  • in addition to that, some "is logged in mandatory" issues were fixed, especially relevant for first time users with new products

Screenshot

no images before images before
Screenshot_2023-06-20-12-59-00 Screenshot_2023-06-20-12-59-32
Screenshot_2023-06-20-12-56-16 Screenshot_2023-06-20-12-57-15

Fixes bug(s)

Impacted files

  • edit_image_button.dart: added an optional border
  • edit_ocr_page.dart: unrelated add of "logged in?" parameter
  • product_field_editor.dart: unrelated add of a "logged in?" parameter
  • product_image_local_button.dart: added an optional border and a "logged in?" parameter
  • product_image_server_button.dart: added an optional border and a "logged in?" parameter; added a test if display is relevant
  • product_image_viewer.dart: added a "logged in?" parameter

Impacted files:
* `edit_image_button.dart`: added an optional border
* `edit_ocr_page.dart`: unrelated add of "logged in?" parameter
* `product_field_editor.dart`: unrelated add of a "logged in?" parameter
* `product_image_local_button.dart`: added an optional border and a "logged in?" parameter
* `product_image_server_button.dart`: added an optional border and a "logged in?" parameter; added a test if display is relevant
* `product_image_viewer.dart`: added a "logged in?" parameter
@codecov-commenter
Copy link

codecov-commenter commented Jun 20, 2023

Codecov Report

Merging #4218 (ddb77a4) into develop (42b8788) will increase coverage by 0.32%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #4218      +/-   ##
===========================================
+ Coverage    10.88%   11.21%   +0.32%     
===========================================
  Files          277      277              
  Lines        13600    13763     +163     
===========================================
+ Hits          1481     1543      +62     
- Misses       12119    12220     +101     
Impacted Files Coverage Δ
...mooth_app/lib/pages/product/edit_image_button.dart 0.00% <0.00%> (ø)
...es/smooth_app/lib/pages/product/edit_ocr_page.dart 0.00% <0.00%> (ø)
...th_app/lib/pages/product/product_field_editor.dart 0.00% <ø> (ø)
.../lib/pages/product/product_image_local_button.dart 0.00% <0.00%> (ø)
...lib/pages/product/product_image_server_button.dart 0.00% <0.00%> (ø)
...th_app/lib/pages/product/product_image_viewer.dart 0.00% <0.00%> (ø)

... and 31 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

  • Can we have a little space between text and border ?
  • Also, can the border line be brown in light mode ?

Impacted file:
* `edit_image_button.dart`: colors and padding slight change
@monsieurtanuki
Copy link
Contributor Author

With the latest push

no images before images before
Screenshot_2023-06-20-14-00-11 Screenshot_2023-06-20-14-01-22

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.

Visually good 👌

@monsieurtanuki monsieurtanuki merged commit 25eb15b into openfoodfacts:develop Jun 20, 2023
6 checks passed
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.

White on White buttons Irrelevant "select an existing picture" button for new products
3 participants