Skip to content

Enable defaultTextToOverflowHidden by default#55632

Open
NickGerleman wants to merge 2 commits intofacebook:mainfrom
NickGerleman:export-D93796779
Open

Enable defaultTextToOverflowHidden by default#55632
NickGerleman wants to merge 2 commits intofacebook:mainfrom
NickGerleman:export-D93796779

Conversation

@NickGerleman
Copy link
Contributor

Summary:
Talking to mdvacca, we think this change should be pretty safe, so turning on by default. Changelog entry in last change.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D93796779

…visible text with props 2.0) (facebook#55553)

Summary:

RN components on the native side currently act like a mix of both overflow: hidden and overflow: visible, veering closer to the former in the ways that matter most.

PreparedLayoutTextView lets us implement this more correctly, and either clip text to padding box, or not clip the text at all.

For compat, PreparedLayoutTextView/PreparedLayoutTextViewManager defaulted to `overflow: hidden`. Props 2.0, broke this, since we need to see overflow state change in Fabric props, which defaults to Yoga blank style defaults (always `overflow: visible`).

The sanest solution I could find was to change Android native view to keep same defaults as Fabric style layer, then explicitly set `overflow: hidden` at the style layer, as the default behavior.

This does slightly change behavior, so that components which previously clipped at the bounding rect of their border box, now clip at their padding box. I.e. text will not be drawn over borders, or rounded corners, by default after this change.


Changelog:
[General][Changed] - Text is no longer drawn on top of borders by default
[General][Changed] - Text outside the bounds of a borderRadius is now hidden by default

Reviewed By: mdvacca

Differential Revision: D93324626
Summary:
Talking to mdvacca, we think this change should be pretty safe, so turning on by default. Changelog entry in last change.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D93796779
@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 Feb 20, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 20, 2026

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments