mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Enable defaultTextToOverflowHidden by default (#55632)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55632 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 fbshipit-source-id: 12472f4fff23eaf855fe200eee081e82b3f4b40a
This commit is contained in:
1 parent
4ad76b6eb2
commit
47c7165c3a
7 files changed
+72
-9
No files matched your search
+2
-1
@@ -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>,
|
||||
|
||||
@@ -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>,
|
||||
);
|
||||
|
||||
@@ -66,6 +66,11 @@ describe('Text', () => {
|
||||
accessible={true}
|
||||
allowFontScaling={true}
|
||||
ellipsizeMode="tail"
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
/>
|
||||
`);
|
||||
});
|
||||
@@ -88,6 +93,11 @@ describe('Text', () => {
|
||||
ellipsizeMode="tail"
|
||||
isHighlighted={false}
|
||||
isPressable={true}
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
>
|
||||
Clickable Text
|
||||
</RCTText>
|
||||
@@ -107,6 +117,11 @@ describe('Text', () => {
|
||||
ellipsizeMode="tail"
|
||||
isHighlighted={false}
|
||||
isPressable={true}
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
>
|
||||
Long Press Text
|
||||
</RCTText>
|
||||
@@ -126,6 +141,11 @@ describe('Text', () => {
|
||||
ellipsizeMode="tail"
|
||||
isHighlighted={false}
|
||||
isPressable={true}
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
>
|
||||
Responder Text
|
||||
</RCTText>
|
||||
@@ -147,6 +167,11 @@ describe('Text', () => {
|
||||
ellipsizeMode="tail"
|
||||
isHighlighted={false}
|
||||
isPressable={true}
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
>
|
||||
Explicit Button Role
|
||||
</RCTText>
|
||||
@@ -169,6 +194,11 @@ describe('Text', () => {
|
||||
isHighlighted={false}
|
||||
isPressable={true}
|
||||
role="button"
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
>
|
||||
Explicit Role Prop
|
||||
</RCTText>
|
||||
@@ -193,6 +223,11 @@ describe('Text', () => {
|
||||
allowFontScaling={true}
|
||||
disabled={true}
|
||||
ellipsizeMode="tail"
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
>
|
||||
Disabled Pressable Text
|
||||
</RCTText>
|
||||
@@ -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>
|
||||
@@ -232,6 +277,11 @@ describe('Text', () => {
|
||||
accessible={true}
|
||||
allowFontScaling={true}
|
||||
ellipsizeMode="tail"
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
>
|
||||
Non-pressable Text
|
||||
</RCTText>
|
||||
@@ -257,6 +307,11 @@ describe('Text compat with web', () => {
|
||||
allowFontScaling={true}
|
||||
ellipsizeMode="tail"
|
||||
nativeID="id"
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
tabIndex={0}
|
||||
testID="testID"
|
||||
/>
|
||||
@@ -374,6 +429,11 @@ describe('Text compat with web', () => {
|
||||
ellipsizeMode="tail"
|
||||
importantForAccessibility="no-hide-descendants"
|
||||
role="main"
|
||||
style={
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
}
|
||||
}
|
||||
/>
|
||||
`);
|
||||
});
|
||||
@@ -404,6 +464,7 @@ describe('Text compat with web', () => {
|
||||
"display": "flex",
|
||||
"flex": 1,
|
||||
"marginInlineStart": 10,
|
||||
"overflow": "hidden",
|
||||
"textAlignVertical": "center",
|
||||
"userSelect": undefined,
|
||||
"verticalAlign": undefined,
|
||||
|
||||
+2
-2
@@ -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>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
}
|
||||
|
||||
bool defaultTextToOverflowHidden() override {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool disableEarlyViewCommandExecution() override {
|
||||
|
||||
@@ -83,7 +83,7 @@ const definitions: FeatureFlagDefinitions = {
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
defaultTextToOverflowHidden: {
|
||||
defaultValue: false,
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
dateAdded: '2026-02-13',
|
||||
description:
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user