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

Fixing line truncation issue when numberOfLines = {1} #37667

Closed

Conversation

arushikesarwani94
Copy link
Contributor

Summary:
Changelog:
[Android][Fixed] - Fixing line truncation issue in Text containing /n when numberOfLines = {1}

When the text has multiple lines (with new line characters \n to hard-break the lines), and the first line is short enough to fit, Text component with numberOfLines = {1} doesn't display "..." at the end and rather disrespects the /n character.

With numberOfLines = {1}, On iOS it translates to
line 1, on Android & Web it translates to line 1 line 2...

Expected Behavior :

line 1...

Reviewed By: NickGerleman

Differential Revision: D46175963

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jun 2, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46175963

Summary:
Pull Request resolved: facebook#37667

Changelog:
[Android][Fixed] - Fixing line truncation issue in Text containing /n when numberOfLines = {1}

When the text has multiple lines (with new line characters \n to hard-break the lines), and the first line is short enough to fit, Text component with `numberOfLines = {1}` doesn't display "..." at the end and rather disrespects the /n character.

With `numberOfLines = {1}`, On iOS it translates to
`line 1`, on Android & Web it translates to `line 1 line 2...`

**Expected Behavior :**

`line 1...`

Reviewed By: javache, NickGerleman

Differential Revision: D46175963

fbshipit-source-id: 75db6df1d8b749a168630b6be29bf80f479a4db1
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46175963

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 0af806e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants