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

Can we ensure Open Food Facts is never cut into 2 parts (carriage return before Open) ? #1405

Closed
teolemon opened this issue Mar 29, 2022 · 12 comments
Assignees
Labels
🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion…

Comments

@teolemon
Copy link
Member

What

  • Can we ensure Open Food Facts is never cut into 2 parts (carriage return before Open) ?

image

Part of

@teolemon teolemon added the 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… label Mar 29, 2022
@monsieurtanuki
Copy link
Contributor

unbreakable spaces?

@bhattabhi013
Copy link
Contributor

bhattabhi013 commented Mar 29, 2022

If I understand it right, we need to display welcome to in one line and open food facts in another. If that's the case I suggest adding two different text widgets in a column.

@abhay1821
Copy link
Contributor

abhay1821 commented Mar 29, 2022

I too think "Welcome to" in the first line followed by "Open food facts" in another line . But adding two different text widget in a column will create space between both the line as "mainAxisAlignment: MainAxisAlignment.spaceEvenly" and overall card. We can do it with a better approach Without changing overall spaces b/w widgets like this

CArd

@abhay1821
Copy link
Contributor

So @bhattabhi013 If you don't mind may I fix it ? But want to hear from @teolemon first.

@teolemon
Copy link
Member Author

@monsieurtanuki would this suffice ? We need to keep translations in mind, so if we could avoid splitting the string, that would be 💯

@bhattabhi013
Copy link
Contributor

So @bhattabhi013 If you don't mind may I fix it ? But want to hear from @teolemon first.

Yeah sure, feels like you have a good solution.

@monsieurtanuki
Copy link
Contributor

I guess it does work:

Capture d’écran 2022-03-29 à 20 49 05

Simulator Screen Shot - iPhone 8 Plus - 2022-03-29 at 20 48 32

@abhay1821
Copy link
Contributor

Hi @teolemon I thought of Your concern and thought of another approach but need a suggestion from you both that is good enough to be solve it ?

image

@abhay1821
Copy link
Contributor

I guess it does work:

Capture d’écran 2022-03-29 à 20 49 05

Simulator Screen Shot - iPhone 8 Plus - 2022-03-29 at 20 48 32

HI @monsieurtanuki It looks like something new to learn thanks for adding it up

@abhay1821
Copy link
Contributor

@monsieurtanuki But i do have a doubt that we aren't providing directly text then how would be able to non-breaking spaces between 3 words? Can u suggest solution for it

@monsieurtanuki
Copy link
Contributor

@abhay1821 I'm not sure I understand your worries, but if I had to solve this issue I would:

  1. create a translatable string with parameter like "Welcome to {offName}"
  2. always put the hard-coded string 'Open\u{00A0}Food\u{00A0}Facts' as a parameter (assuming that it's the same name in all languages, regardless of the "alphabet") - and the same idea could be reused for Open Beauty Facts ;)
  3. or just put "welcomeToOpenFoodFacts": "Welcome to Open\u00A0Food\u00A0Facts" and have it translated, assuming that the translators take care of putting the unbreakable spaces

@abhay1821
Copy link
Contributor

Thank You @monsieurtanuki for Your detailed solution. @teolemon could you please assign this to me if it's free to take.

@teolemon teolemon linked a pull request Mar 30, 2022 that will close this issue
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Mar 31, 2022
Impacted files:
* `app_en.arb`
* `app_fr.arb`
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants