Skip to content

Add longest-line sizing for wrapped Text - #58351

Open
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D118718410
Open

Add longest-line sizing for wrapped Text#58351
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D118718410

Conversation

@Abbondanzo

Copy link
Copy Markdown
Contributor

Summary:
Add textWidthMode="longest-line" to size wrapped Text to its widest rendered line on Android and iOS. This keeps content-proportional spacing in horizontal layouts without an onTextLayout round trip; the default measurement behavior is unchanged.

Changelog:
[General][Added] - Add textWidthMode="longest-line" for sizing wrapped Text to its widest rendered line.

Differential Revision: D118718410

Summary:
Add `textWidthMode="longest-line"` to size wrapped `Text` to its widest rendered line on Android and iOS. This keeps content-proportional spacing in horizontal layouts without an `onTextLayout` round trip; the default measurement behavior is unchanged.

Changelog:
[General][Added] - Add `textWidthMode="longest-line"` for sizing wrapped `Text` to its widest rendered line.

Differential Revision: D118718410
@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 Sep 4, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Sep 4, 2026
@meta-codesync

meta-codesync Bot commented Sep 4, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

@Abbondanzo

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

🤖 AI code review

Decision: Ready for human review

Overall PR risk: Low. The change is additive and preserves default Text measurement, with new behavior limited to Text that opts into longest-line mode on Android and iOS. The most plausible breakage is narrower measurement or rewrapping for opted-in Text only. No critical or warning findings were reported.

No findings.


This review is advisory — it never blocks a merge and never auto-approves.

@Abbondanzo

Copy link
Copy Markdown
Contributor Author

/review

1 similar comment
@Abbondanzo

Copy link
Copy Markdown
Contributor Author

/review

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant