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

Hyphenate wrapped text #735

Open
ximenabb opened this issue Sep 9, 2021 · 7 comments
Open

Hyphenate wrapped text #735

ximenabb opened this issue Sep 9, 2021 · 7 comments
Assignees
Labels
bug nuggets sprint candidate issues to consider during spring planning

Comments

@ximenabb
Copy link

ximenabb commented Sep 9, 2021

Raised by : Emilie Reiser

Description :
On smaller screens, long words in category labels are split arbitrarily by character without hyphens.

Screenshot_20210826-211743__01

3 points - if quick fix
See if theres other devices recreating

@ximenabb ximenabb added bug sprint candidate issues to consider during spring planning nuggets labels Sep 9, 2021
@ErikSin
Copy link
Contributor

ErikSin commented Sep 21, 2021

I did some research on this and found that this was a common problem in React Native Android. There are a few fixes that are quite complicated when dealing with multiple languages. There are entire libraries that try to address this issue, but again, requires a lot of configuration based on the language.

That being said, React Native version 0.64 and up, has an API that allows this to happen automatically by setting one on the fields in the TextComponent. We are currently using 0.63. We are planning on upgrading react native, and when we do that, this will be an easy fix. Refer to textBreakStrategy

I would suggest that we address this problem after we upgrade as it will be a much easier fix then manually trying to do it with each text component.

@gmaclennan
Copy link
Member

It looks like textBreakStrategy exists in 0.63 too, and by default it is set to highQuality. Is there a bug in 0.63 that is fixed in 0.64?

@ErikSin
Copy link
Contributor

ErikSin commented Sep 21, 2021

Sorry, not textBreakStrategy I meant android-hyphenationFrequecy.

@achou11
Copy link
Member

achou11 commented Sep 21, 2021

@ErikSin out of curiosity, does textBreakStrategy work at all?

@gmaclennan
Copy link
Member

Ah, that makes sense. Your suggestion of holding off to the upgrade of RN makes sense to me.

@ErikSin
Copy link
Contributor

ErikSin commented Sep 21, 2021

@ErikSin out of curiosity, does textBreakStrategy work at all?

The default value for textBreakStrategy is already at the maximum, so the screenshot that Emilie shared is the best it gets!

@ximenabb
Copy link
Author

@emreiser tagging you for visibility. Updating our version of React Native will be the simplest way to fix this issue. See convo up top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug nuggets sprint candidate issues to consider during spring planning
Projects
No open projects
Status: No status
Development

No branches or pull requests

4 participants