Open fabOnReact opened 1 year ago
| getLineWidth | getWidth | | ----------- | ----------- | | | |
```javascript
import * as React from 'react';
import {
Button,
Text,
SafeAreaView,
StyleSheet,
Pressable,
View,
} from 'react-native';
const RNTesterApp = () => {
const [text, setText] = React.useState('From vincenzoddragon+five@gmail.com');
var things = ['short', 'verylong', 'superlongword'];
var thing = things[Math.floor(Math.random() * things.length)];
const addText = () => {
setText(prevText => prevText + ' ' + thing);
};
const email =
'From vincenzoddragon+five@gmail.com From vincenzoddragon+five@gmail.com \n';
return (
<>
| Original Issue commit 85308 | After PR | | ----------- | ----------- | | | |
```javascript
const RNTesterApp = () => {
const email =
'From vincenzoddragon+five@gmail.com From vincenzoddragon+five@gmail.com';
return (
<>
Text width is higher of parent ([YogaMeasureMode.EXACTLY](https://github.com/fabriziobertoglio1987/react-native/blob/008b6ea20eacf6a8beb9c1beff7e3ee1c21705ef/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java#L132))
```javascript
const RNTesterApp = () => {
const email =
'From vincenzoddragon+five@gmail.com From vincenzoddragon+five@gmail.com';
return (
<>
CLICK TO OPEN TESTS RESULTS
```javascript
const RNTesterApp = () => {
const email1 = 'From vincenzoddragon+five@gmail.com';
const email2 = 'From vincenzoddragon+five@gmail.com';
return (
<>
CLICK TO OPEN SOURCECODE
| Before | After | | ----------- | ----------- | | | |
```javascript
const RNTesterApp = () => {
const [flexShrink, setFlexShrink] = React.useState(1);
const increaseShrink = () => {
setFlexShrink(prevFlexShrink => prevFlexShrink + 1);
};
const email =
'From vincenzoddragon+five@gmail.com From vincenzoddragon+five@gmail.com';
return (
<>
CLICK TO OPEN TESTS RESULTS
1) FontSizeAdjustment, Wrap, Hyphenation | Before | After | | ----------- | ----------- | | | | 2) Padding | Before | After | | ----------- | ----------- | | | | 3. Text Metrics | Before | After | | ----------- | ----------- | | | | 4. Nested, Text Align | Before | After | | ----------- | ----------- | | | | 5. Number of Lines, allowFontScaling | Before | After | | ----------- | ----------- | | | | | Before | After | | ----------- | ----------- | | | |
Before | After |
---|---|
Before | After |
---|---|
Before | After |
---|---|
Before | After |
---|---|
1. Dynamic Font Size Adjustment | Before | After | | ----------- | ----------- | | | | 2. Font Size Adjustment with Dynamic Layout | Before | After | | ----------- | ----------- | | | | 3. Wrap, Hyphenation, Padding | Before | After | | ----------- | ----------- | | | | 4. Arabic Language (rtl) | Before | After | | ----------- | ----------- | | | | 4. English Language (ltr) | Before | After | | ----------- | ----------- | | | |
Before | After |
---|---|
Before | After |
---|---|
Before | After |
---|---|
Before | After |
---|---|
```javascript
import * as React from 'react';
import {Text, SafeAreaView, StyleSheet, Pressable, View} from 'react-native';
const RNTesterApp = () => {
const email =
'From vincenzoddragon+five@gmail.com From vincenzoddrlxagon+five@gmail.com';
return (
<>
CLICK TO OPEN SOURCECODE
https://gist.github.com/fabriziobertoglio1987/7173e32796635cac5390d4d3fb4ed9b9 https://github.com/facebook/react-native/issues/39722 https://github.com/Expensify/App/issues/21219 PR https://github.com/facebook/react-native/pull/41770