Skip to content

Take Text ellipsizeMode from the measured paragraph attributes on Android - #58865

Closed
bartlomiejbloniarz wants to merge 1 commit into
mainfrom
export-D123029564
Closed

bartlomiejbloniarz wants to merge 1 commit into
mainfrom
export-D123029564

Conversation

@bartlomiejbloniarz

Copy link
Copy Markdown
Contributor

Summary:
On Android, ReactTextView measured text with the paragraph attributes from its state, but drew the ellipsis from a separate ellipsizeMode view prop that starts as tail. The paragraph attributes default ellipsizeMode to clip. When a view is created with props that omit values equal to their defaults, an explicit ellipsizeMode="clip" never reached the view prop, so text with numberOfLines was truncated with an ellipsis instead of being clipped.

ReactTextView now takes the ellipsis from the same paragraph attributes it is measured with, like minimumFontSize and textBreakStrategy, so a single source of truth decides it, as on iOS.

Changelog: [Android][Fixed] - Fix ellipsizeMode="clip" being ignored on newly created Text

Differential Revision: D123029564

…ndroid

Summary:
On Android, `ReactTextView` measured text with the paragraph attributes from its state, but drew the ellipsis from a separate `ellipsizeMode` view prop that starts as `tail`. The paragraph attributes default `ellipsizeMode` to `clip`. When a view is created with props that omit values equal to their defaults, an explicit `ellipsizeMode="clip"` never reached the view prop, so text with `numberOfLines` was truncated with an ellipsis instead of being clipped.

`ReactTextView` now takes the ellipsis from the same paragraph attributes it is measured with, like `minimumFontSize` and `textBreakStrategy`, so a single source of truth decides it, as on iOS.

Changelog: [Android][Fixed] - Fix `ellipsizeMode="clip"` being ignored on newly created `Text`

Differential Revision: D123029564
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 5, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 5, 2026
@meta-codesync

meta-codesync Bot commented Oct 5, 2026

Copy link
Copy Markdown

@bartlomiejbloniarz has exported this pull request. If you are a Meta employee, you can view the originating Diff in D123029564.

@bartlomiejbloniarz bartlomiejbloniarz 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 p: Software Mansion Partner: Software Mansion meta-exported labels Oct 5, 2026
@meta-codesync meta-codesync Bot closed this in 8cd9b76 Oct 6, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Oct 6, 2026
@meta-codesync

meta-codesync Bot commented Oct 6, 2026

Copy link
Copy Markdown

This pull request has been merged in 8cd9b76.

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. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant