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: The front picture is now fully visible on the product page #5828

Merged
merged 7 commits into from
Nov 11, 2024

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Nov 10, 2024

Hi everyone!

This PR (re)introduces the front picture on the product page, but there are also some tweaks to this page:

Compatibility score

  • The compatibility score now has a Tooltip to better explain what it is
    IMG_1324.

Front picture

  • The front picture is fully visible and not centered (vs search)

  • There is a slight border

  • The quantity is below the brands (and not on the right)

    Screenshot_1731218063

  • If the front picture is outdated, the indicator is also visible on this page
    Screenshot_1731218156

  • And there's a Tooltip to explain
    IMG_1323

Brands

  • Brands are well formatted (was the case with search results… but not this page)
    Screenshot_1731218200

Error states

  • If there is no picture available, instead of the blueish placeholder, I've created one with the orange (feel free to add some feedback)
    IMG_1330

  • If there is a network error, it's now fully explained
    IMG_1329

Dark mode

  • Obviously, it's dark mode compatible
    Screenshot_1731217859

Misc

  • Obviously, it's a11n compatible

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 0.54054% with 184 lines in your changes missing coverage. Please review.

Project coverage is 6.98%. Comparing base (4d9c7fc) to head (b0490d6).
Report is 452 commits behind head on develop.

Files with missing lines Patch % Lines
...pp/lib/cards/product_cards/product_title_card.dart 0.74% 133 Missing ⚠️
...pages/product/product_page/new_product_header.dart 0.00% 40 Missing ⚠️
...b/pages/product/product_page/new_product_page.dart 0.00% 8 Missing ⚠️
...pages/product/product_page/new_product_footer.dart 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5828      +/-   ##
==========================================
- Coverage     9.54%   6.98%   -2.57%     
==========================================
  Files          325     413      +88     
  Lines        16411   22644    +6233     
==========================================
+ Hits          1567    1581      +14     
- Misses       14844   21063    +6219     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@g123k g123k changed the title feat: Front picture now fully visible on the product page feat: The front picture is now fully visible on the product page Nov 10, 2024
@g123k
Copy link
Collaborator Author

g123k commented Nov 10, 2024

I know, there are many commits, but as always, details are details! 😉

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.

It would be tempting to remove the background using on device segmentation (MLkit), but that's for another time.

@teolemon
Copy link
Member

@g123k What's the image ? main product language ? ui language ? any language available if main product language not available ?

@g123k
Copy link
Collaborator Author

g123k commented Nov 10, 2024

@g123k What's the image ? main product language ? ui language ? any language available if main product language not available ?

Same as today:

  • Front picture in the current language
  • Otherwise front picture from the API
  • Otherwise "No image"

In a second PR, I want to show a message in the photo grid to explain why there is a picture on the product page and not there.

Also, a second idea would be to launch the photo grid in a "best world" mode, with photos from any language.

@teolemon teolemon merged commit 2168ab1 into openfoodfacts:develop Nov 11, 2024
6 checks passed
@g123k g123k deleted the product_page_picture branch November 18, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants