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: 5 bugfixes (icons color, better network mgmt / Japanese…) #6127

Merged
merged 7 commits into from
Jan 6, 2025

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Jan 4, 2025

Hi everyone!

Here are 4 fixes:

  • The icon color in dark mode is now OK (my fault) Dark mode issues are back #6122

  • When the image in the tagline fails to load, the image container is hidden in all cases (non-vectorial + svg)
    IMG_1662

  • Product picture: force a loader when the image is loading
    IMG_1664

  • Product gallery: force a loader when the image is loading
    IMG_1666

  • A table width can't have a width of 0 Weird table layout in Japanese  #6125
    IMG_1667

@github-actions github-actions bot added the 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… label Jan 4, 2025
@g123k g123k linked an issue Jan 4, 2025 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2025

Codecov Report

Attention: Patch coverage is 3.33333% with 29 lines in your changes missing coverage. Please review.

Project coverage is 6.38%. Comparing base (4d9c7fc) to head (0d27f7e).
Report is 611 commits behind head on develop.

Files with missing lines Patch % Lines
.../lib/cards/product_cards/smooth_product_image.dart 0.00% 10 Missing ⚠️
...p/lib/generic_lib/widgets/images/smooth_image.dart 0.00% 8 Missing ⚠️
...ages/smooth_app/lib/pages/prices/price_button.dart 0.00% 6 Missing ⚠️
...ib/pages/scan/carousel/main_card/scan_tagline.dart 0.00% 3 Missing ⚠️
...l/knowledge_panels/knowledge_panel_table_card.dart 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6127      +/-   ##
==========================================
- Coverage     9.54%   6.38%   -3.17%     
==========================================
  Files          325     448     +123     
  Lines        16411   25502    +9091     
==========================================
+ Hits          1567    1628      +61     
- Misses       14844   23874    +9030     

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

@g123k g123k changed the title fix: 4 bugfixes including icons color and better network mgmt fix: 5 bugfixes (icons color, better network mgmt / Japanese…) Jan 4, 2025
@g123k g123k linked an issue Jan 4, 2025 that may be closed by this pull request
Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Hi @g123k!
Please have a look at my comments.
Beyond them:

  • several circular progress indicators at the same time is a good idea to provoke headaches - especially if you're already cursed with low connectivity. A less aggressive OFF specific "wait indicator" may be more appropriate
  • I still think it would be relevant to cache the home page "support us" logo

frameBuilder: (_, Widget child, int? frame, ____) {
if (frame == null) {
return const Center(
child: CircularProgressIndicator(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
child: CircularProgressIndicator(),
child: CircularProgressIndicator.adaptive(),

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here I'm deliberately forcing the non-adaptive variant, because on iOS, the loader is very small.

: null,
),
child: const Center(
child: CircularProgressIndicator(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
child: CircularProgressIndicator(),
child: CircularProgressIndicator.adaptive(),

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same here.
I'm deliberately forcing the non-adaptive variant, because on iOS, the loader is very small.

@@ -69,7 +69,7 @@ class SmoothTheme {
? Colors.white
: myColorScheme.onPrimary,
),
iconColor: WidgetStateProperty.all<Color>(Colors.white),
iconColor: WidgetStateProperty.all<Color>(myColorScheme.onPrimary),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand the code here.
The goal is to be able to say: I want this icon in that color (e.g. green or orange for price tags). It's not the same as default light/dark colors. Like here:
Image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

True, but the issue is when we don't specify the color.

Copy link
Member

Choose a reason for hiding this comment

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

@raphodn some context we could expose to users a out those colors ?

@monsieurtanuki
Copy link
Contributor

monsieurtanuki commented Jan 5, 2025 via email

@github-actions github-actions bot added the Prices label Jan 5, 2025
@g123k
Copy link
Collaborator Author

g123k commented Jan 5, 2025

Does it work with orange or green price labels?
________________________________ De : Edouard Marquez @.> Envoyé : dimanche 5 janvier 2025 20:24 À : openfoodfacts/smooth-app @.> Cc : monsieurtanuki @.>; Comment @.> Objet : Re: [openfoodfacts/smooth-app] fix: 5 bugfixes (icons color, better network mgmt / Japanese…) (PR #6127) @g123k commented on this pull request.
________________________________ In packages/smooth_app/lib/themes/smooth_theme.dart<#6127 (comment)>:
@@ -69,7 +69,7 @@ class SmoothTheme {
? Colors.white : myColorScheme.onPrimary, ), - iconColor: WidgetStateProperty.all(Colors.white), + iconColor: WidgetStateProperty.all(myColorScheme.onPrimary), True, but the issue is when we don't specify the color. — Reply to this email directly, view it on GitHub<#6127 (comment)>, or unsubscribe<github.com/notifications/unsubscribe-auth/ACYKI3Y5QRULZT45LH4XC2T2JGBH5AVCNFSM6AAAAABUTLPWZ6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMZQHE2TENJTGQ>. You are receiving this because you commented.Message ID: @.***>

Ok, this is fixed for prices buttons, where we say icon color = foreground color

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

The bugs being fixed, let's go!

@teolemon teolemon merged commit 43d282a into openfoodfacts:develop Jan 6, 2025
6 checks passed
@g123k g123k deleted the bugfixes branch January 6, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 Knowledge panels - Table widget 📖 Knowledge panels Prices 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
Development

Successfully merging this pull request may close these issues.

Weird table layout in Japanese Dark mode issues are back
4 participants