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: Wrap list names on product page #3647

Merged

Conversation

prathamsoni11
Copy link
Contributor

What

  • changed the list button on the product page

Screenshot

Part of

@prathamsoni11 prathamsoni11 requested a review from a team as a code owner January 27, 2023 04:52
@github-actions github-actions bot added Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🥫 Product page labels Jan 27, 2023
@monsieurtanuki
Copy link
Contributor

Hi @prathamsoni11!
The names of the lists in your screenshot are not realistic, IMHO.
Could you please attach an additional screenshot with realistic words instead, like "breakfast", "energy" or "walmart"? Or whatever words that look realistic to you?

@prathamsoni11
Copy link
Contributor Author

Hi @prathamsoni11!
The names of the lists in your screenshot are not realistic, IMHO.
Could you please attach an additional screenshot with realistic words instead, like "breakfast", "energy" or "walmart"? Or whatever words that look realistic to you?

@monsieurtanuki
Copy link
Contributor

You seem to be very lucky with your name choices: they all seem to fit magically on the first rows.
I find it fishy.
That's all I have to say about that.

Copy link

@adilwahla adilwahla left a comment

Choose a reason for hiding this comment

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

👍

@monsieurtanuki
Copy link
Contributor

@prathamsoni11 Sorry about that, but we already tried with smaller buttons in Wrap. Which looks cool, like what you coded. Until the labels do not fit, and then that does not look good anymore.
If we want to avoid an endless loop of "let's try with small buttons so they don't take too much space" and "let's try with large buttons so that everything is aligned", we need to find a solution that works when we are lucky and when we are not lucky.
As your first row of buttons fits almost perfectly the screen width, I would like to see what's going on when the labels are not so well combined. Could you please share a screenshot about it?
Another solution would be to order the buttons so that they fit as well as possible, but that's another story.

@prathamsoni11
Copy link
Contributor Author

@monsieurtanuki like this I guess

@M123-dev
Copy link
Member

I mean it's exactly what I had imagined, so I don't have a critical view on it, if I have a lot of lists (with mostly small names) everything is better than tanking the whole width for each.

When I understand your concerns, you mean cases like this (amazing ms paint image):
grafik

Where the line break will cause irregularities, looking at the docs of a package which provides a WrapSuper widget with more features it looks like the Wrap widget already distributes widgets so that they fit in the best way possible, not just in the provided order.

Even if not we could use the beforementioned package with WrapSuper and WrapFit to make it look more harmonious

@prathamsoni11
Copy link
Contributor Author

Screenshot_2023-02-03-23-30-18-749_org openfoodfacts scanner

@M123-dev
Copy link
Member

M123-dev commented Feb 3, 2023

@prathamsoni11 the ci is complaining about a unused import

https://github.com/openfoodfacts/smooth-app/actions/runs/4021677946/jobs/6910758389#step:7:1

After that we can merge

Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @prathamsoni11

But the tests are still complaining

https://github.com/openfoodfacts/smooth-app/actions/runs/4090853782/jobs/7054555673#step:8:1

I honestly don't know why. Did you test with flutter 3.0.7, or with Wrap instead of WrapSuper

@prathamsoni11
Copy link
Contributor Author

Looks good, thanks @prathamsoni11

But the tests are still complaining

https://github.com/openfoodfacts/smooth-app/actions/runs/4090853782/jobs/7054555673#step:8:1

I honestly don't know why. Did you test with flutter 3.0.7, or with Wrap instead of WrapSuper

No i have to test with 3.0.7. After testing I’ll update you

@M123-dev
Copy link
Member

M123-dev commented Feb 4, 2023

Oh, I mean 3.7.0 😅

@prathamsoni11
Copy link
Contributor Author

Oh, I mean 3.7.0 😅

Checked with 3.7.0 working fine and no issues

@prathamsoni11
Copy link
Contributor Author

Looks good, thanks @prathamsoni11

But the tests are still complaining

https://github.com/openfoodfacts/smooth-app/actions/runs/4090853782/jobs/7054555673#step:8:1

I honestly don't know why. Did you test with flutter 3.0.7, or with Wrap instead of WrapSuper

with Wrap output

with WrapSuper output

@M123-dev M123-dev changed the title fix: changed the list button on the product page feat: Wrap list names on product page Feb 4, 2023
@monsieurtanuki
Copy link
Contributor

@prathamsoni11 That looks better with WrapSuper, congratulations!
You use assorted_layout_widgets 6.1.1; would you try with 7.0.0 now that we've upgraded to flutter 3.7?

@monsieurtanuki
Copy link
Contributor

@prathamsoni11 We've recently upgraded to dart 2.19 and flutter 3.7.

% flutter upgrade        
Flutter is already up to date on channel stable
Flutter 3.7.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7048ed95a5 (3 days ago) • 2023-02-01 09:07:31 -0800
Engine • revision 800594f1f4
Tools • Dart 2.19.1 • DevTools 2.20.1

@codecov-commenter
Copy link

Codecov Report

Merging #3647 (a26b07d) into develop (ad46236) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           develop   #3647      +/-   ##
==========================================
- Coverage     9.45%   9.45%   -0.01%     
==========================================
  Files          269     269              
  Lines        13571   13576       +5     
==========================================
  Hits          1283    1283              
- Misses       12288   12293       +5     
Impacted Files Coverage Δ
...smooth_app/lib/pages/product/new_product_page.dart 0.00% <0.00%> (ø)

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

@monsieurtanuki monsieurtanuki merged commit bf1fe91 into openfoodfacts:develop Feb 4, 2023
@monsieurtanuki
Copy link
Contributor

Thank you @prathamsoni11!

@prathamsoni11
Copy link
Contributor Author

Thank you @prathamsoni11!

Your welcome @monsieurtanuki 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🥫 Product page
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants