Skip to content

Add prepared-text-layout screenshot coverage for wrapped Text - #58414

Open
Abbondanzo wants to merge 2 commits into
react:mainfrom
Abbondanzo:export-D119212680
Open

Add prepared-text-layout screenshot coverage for wrapped Text#58414
Abbondanzo wants to merge 2 commits into
react:mainfrom
Abbondanzo:export-D119212680

Conversation

@Abbondanzo

Copy link
Copy Markdown
Contributor

Summary:
Add screenshot coverage for the RNTester textWidthMode example and run it
against both text measurement paths: the default one, and the one behind the
enablePreparedTextLayout runtime gate, which measures paragraphs through a
separate code path in TextLayoutManager.

RNTester now applies a feature flag override before React Native starts, so a
test harness can select which variant the app boots with.

Changelog:
[Internal] - Add RNTester screenshot coverage for textWidthMode under both text layout paths

Differential Revision: D119212680

Peter Abbondanzo and others added 2 commits September 8, 2026 16:43
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 screenshot coverage for the RNTester `textWidthMode` example and run it
against both text measurement paths: the default one, and the one behind the
`enablePreparedTextLayout` runtime gate, which measures paragraphs through a
separate code path in `TextLayoutManager`.

RNTester now applies a feature flag override before React Native starts, so a
test harness can select which variant the app boots with.

Changelog:
[Internal] - Add RNTester screenshot coverage for `textWidthMode` under both text layout paths

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

meta-codesync Bot commented Sep 8, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Sep 8, 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

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