Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ describe('<Pressable>', () => {
ellipsizeMode="tail"
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)">
foregroundColor="rgba(0, 0, 0, 0)"
overflow="hidden">
the quick brown fox
</rn-paragraph>
</rn-view>,
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native/Libraries/Text/__tests__/Text-itest.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ describe('<Text>', () => {
ellipsizeMode="tail"
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)">
foregroundColor="rgba(0, 0, 0, 0)"
overflow="hidden">
{TEST_TEXT}
</rn-paragraph>,
);
Expand Down
61 changes: 61 additions & 0 deletions packages/react-native/Libraries/Text/__tests__/Text-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ describe('Text', () => {
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Object {
"overflow": "hidden",
}
}
/>
`);
});
Expand All @@ -88,6 +93,11 @@ describe('Text', () => {
ellipsizeMode="tail"
isHighlighted={false}
isPressable={true}
style={
Object {
"overflow": "hidden",
}
}
>
Clickable Text
</RCTText>
Expand All @@ -107,6 +117,11 @@ describe('Text', () => {
ellipsizeMode="tail"
isHighlighted={false}
isPressable={true}
style={
Object {
"overflow": "hidden",
}
}
>
Long Press Text
</RCTText>
Expand All @@ -126,6 +141,11 @@ describe('Text', () => {
ellipsizeMode="tail"
isHighlighted={false}
isPressable={true}
style={
Object {
"overflow": "hidden",
}
}
>
Responder Text
</RCTText>
Expand All @@ -147,6 +167,11 @@ describe('Text', () => {
ellipsizeMode="tail"
isHighlighted={false}
isPressable={true}
style={
Object {
"overflow": "hidden",
}
}
>
Explicit Button Role
</RCTText>
Expand All @@ -169,6 +194,11 @@ describe('Text', () => {
isHighlighted={false}
isPressable={true}
role="button"
style={
Object {
"overflow": "hidden",
}
}
>
Explicit Role Prop
</RCTText>
Expand All @@ -193,6 +223,11 @@ describe('Text', () => {
allowFontScaling={true}
disabled={true}
ellipsizeMode="tail"
style={
Object {
"overflow": "hidden",
}
}
>
Disabled Pressable Text
</RCTText>
Expand All @@ -211,12 +246,22 @@ describe('Text', () => {
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Object {
"overflow": "hidden",
}
}
>
Parent Text
<RCTText
accessibilityRole="link"
isHighlighted={false}
isPressable={true}
style={
Object {
"overflow": "hidden",
}
}
>
Nested Clickable Link
</RCTText>
Expand All @@ -232,6 +277,11 @@ describe('Text', () => {
accessible={true}
allowFontScaling={true}
ellipsizeMode="tail"
style={
Object {
"overflow": "hidden",
}
}
>
Non-pressable Text
</RCTText>
Expand All @@ -257,6 +307,11 @@ describe('Text compat with web', () => {
allowFontScaling={true}
ellipsizeMode="tail"
nativeID="id"
style={
Object {
"overflow": "hidden",
}
}
tabIndex={0}
testID="testID"
/>
Expand Down Expand Up @@ -374,6 +429,11 @@ describe('Text compat with web', () => {
ellipsizeMode="tail"
importantForAccessibility="no-hide-descendants"
role="main"
style={
Object {
"overflow": "hidden",
}
}
/>
`);
});
Expand Down Expand Up @@ -404,6 +464,7 @@ describe('Text compat with web', () => {
"display": "flex",
"flex": 1,
"marginInlineStart": 10,
"overflow": "hidden",
"textAlignVertical": "center",
"userSelect": undefined,
"verticalAlign": undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<9ae90142061f1ea0766058d9cf6f3dc6>>
* @generated SignedSource<<65cdfdcbe22ff163b75e0b067bd72693>>
*/

/**
Expand All @@ -29,7 +29,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun cxxNativeAnimatedEnabled(): Boolean = false

override fun defaultTextToOverflowHidden(): Boolean = false
override fun defaultTextToOverflowHidden(): Boolean = true

override fun disableEarlyViewCommandExecution(): Boolean = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<1926124626012fd9c635ccd00241f92a>>
* @generated SignedSource<<a0dcf7857ba3a41d1f39da63e1627335>>
*/

/**
Expand Down Expand Up @@ -40,7 +40,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
}

bool defaultTextToOverflowHidden() override {
return false;
return true;
}

bool disableEarlyViewCommandExecution() override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const definitions: FeatureFlagDefinitions = {
ossReleaseStage: 'none',
},
defaultTextToOverflowHidden: {
defaultValue: false,
defaultValue: true,
metadata: {
dateAdded: '2026-02-13',
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c71f3d287866aa7b06479009e986a3e6>>
* @generated SignedSource<<97e082b7554dba5b4f387ef783d2d6e3>>
* @flow strict
* @noformat
*/
Expand Down Expand Up @@ -211,7 +211,7 @@ export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter(
/**
* When enabled, sets the default overflow style for Text components to hidden instead of visible.
*/
export const defaultTextToOverflowHidden: Getter<boolean> = createNativeFlagGetter('defaultTextToOverflowHidden', false);
export const defaultTextToOverflowHidden: Getter<boolean> = createNativeFlagGetter('defaultTextToOverflowHidden', true);
/**
* Dispatch view commands in mount item order.
*/
Expand Down
Loading