Skip to content

[0.84] fix: Unicode Text length Calculation#16241

Open
vineethkuttan wants to merge 1 commit into
0.84-stablefrom
unicode84
Open

[0.84] fix: Unicode Text length Calculation#16241
vineethkuttan wants to merge 1 commit into
0.84-stablefrom
unicode84

Conversation

@vineethkuttan

@vineethkuttan vineethkuttan commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

The length of text that is being rendered is not calculated for Unicode characters, this change will fix it

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

Text Highlight for Unicode is not working

Screenshots

image

Testing

Tested in Playground

Changelog

Should this change be included in the release notes: yes

(fix: Unicode Text length Calculation)

Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow

* fix: Unicode Text length Calculation

* Change files

* yarn format fix
@vineethkuttan vineethkuttan requested a review from a team as a code owner June 10, 2026 11:12
@vineethkuttan vineethkuttan changed the title fix: Unicode Text length Calculation [0.84] fix: Unicode Text length Calculation Jun 10, 2026

@iamAbhi-916 iamAbhi-916 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions

Copy link
Copy Markdown

Performance Test Results

Branch: unicode84
Commit: cafacaa6
Time: 2026-06-10T11:39:01.865Z
Tests: 159/161 passed

❌ Regressions Detected

ScrollView

Scenario Baseline Current Change Status
ScrollView children-500 19.67ms 48.33ms +142.1%

ScrollView children-500: Duration increased by 142.1% / +27.00ms (threshold: 10% & 10ms)

TouchableHighlight

Scenario Baseline Current Change Status
TouchableHighlight multiple-touchables-50 13.00ms 17.50ms +48.0%

TouchableHighlight multiple-touchables-50: Duration increased by 48.0% / +6.00ms (threshold: 15% & 5ms)

✅ Passed

138 scenario(s) across 26 suite(s) — no regressions

SectionList

Scenario Mean Median StdDev Renders vs Baseline
SectionList mount 5.30ms 5.00ms ±0.67ms 1 +0.0%
SectionList unmount 0.20ms 0.00ms ±0.42ms 0 +0.0%
SectionList rerender 13.30ms 12.00ms ±3.56ms 2 +14.3%
SectionList with-3-sections-15-items 7.60ms 8.00ms ±1.35ms 1 +45.5%
SectionList with-5-sections-50-items 6.00ms 6.00ms ±0.94ms 1 +0.0%
SectionList with-10-sections-200-items 5.90ms 5.50ms ±1.66ms 1 +0.0%
SectionList with-20-sections-200-items 5.00ms 5.00ms ±1.89ms 1 +0.0%
SectionList with-section-separator 2.50ms 2.50ms ±0.53ms 1 +25.0%
SectionList with-item-separator 2.50ms 2.00ms ±0.71ms 1 +0.0%
SectionList with-header-footer 2.50ms 2.00ms ±0.71ms 1 +0.0%
SectionList with-section-footer 1.90ms 2.00ms ±0.57ms 1 +0.0%
SectionList with-sticky-section-headers 2.30ms 2.00ms ±0.95ms 1 +0.0%
SectionList with-empty-list 0.30ms 0.00ms ±0.48ms 1 -100.0%
SectionList with-50-sections-1000-items 2.40ms 2.00ms ±1.65ms 1 +0.0%

FlatList

Scenario Mean Median StdDev Renders vs Baseline
FlatList mount 5.60ms 5.00ms ±2.07ms 1 +25.0%
FlatList unmount 0.30ms 0.00ms ±0.48ms 0 +0.0%
FlatList rerender 11.80ms 11.00ms ±2.86ms 2 +22.2%
FlatList with-10-items 5.20ms 5.00ms ±1.48ms 1 +25.0%
FlatList with-100-items 6.00ms 5.00ms ±1.83ms 1 +0.0%
FlatList with-500-items 5.00ms 4.50ms ±1.41ms 1 +12.5%
FlatList with-1000-items 4.90ms 5.00ms ±0.99ms 1 +25.0%
FlatList horizontal 5.00ms 4.50ms ±1.76ms 1 -10.0%
FlatList with-separator 1.50ms 1.50ms ±0.53ms 1 -25.0%
FlatList with-header-footer 1.70ms 2.00ms ±0.48ms 1 +0.0%
FlatList with-empty-list 0.40ms 0.00ms ±0.52ms 1 -100.0%
FlatList with-get-item-layout 2.10ms 2.00ms ±1.45ms 1 +100.0%
FlatList inverted 1.90ms 2.00ms ±0.88ms 1 +33.3%
FlatList with-num-columns 3.50ms 3.00ms ±1.58ms 1 +0.0%

TouchableOpacity

Scenario Mean Median StdDev Renders vs Baseline
TouchableOpacity mount 0.70ms 1.00ms ±0.48ms 1 +0.0%
TouchableOpacity unmount 0.00ms 0.00ms ±0.00ms 0 +0.0%
TouchableOpacity rerender 1.50ms 1.50ms ±0.53ms 2 +50.0%
TouchableOpacity custom-active-opacity 0.70ms 1.00ms ±0.48ms 1 +0.0%
TouchableOpacity disabled 0.70ms 1.00ms ±0.48ms 1 +0.0%
TouchableOpacity with-all-handlers 0.80ms 1.00ms ±0.42ms 1 +0.0%
TouchableOpacity with-hit-slop 0.90ms 1.00ms ±0.32ms 1 +0.0%
TouchableOpacity with-delay 0.70ms 1.00ms ±0.48ms 1 +0.0%
TouchableOpacity nested 1.80ms 2.00ms ±0.63ms 1 +100.0%
TouchableOpacity multiple-10 6.47ms 7.00ms ±1.46ms 1 +16.7%
TouchableOpacity multiple-50 30.80ms 31.00ms ±4.44ms 1 +6.9%
TouchableOpacity multiple-100 46.93ms 51.00ms ±11.13ms 1 +2.0%

Pressable

Scenario Mean Median StdDev Renders vs Baseline
Pressable mount 0.40ms 0.00ms ±0.52ms 1 +0.0%
Pressable unmount 0.00ms 0.00ms ±0.00ms 0 +0.0%
Pressable rerender 0.50ms 0.50ms ±0.53ms 2 +0.0%
Pressable with-all-handlers 0.50ms 0.50ms ±0.53ms 1 +Infinity%
Pressable with-style-function 0.40ms 0.00ms ±0.52ms 1 +0.0%
Pressable disabled 0.30ms 0.00ms ±0.48ms 1 +0.0%
Pressable with-hit-slop 0.40ms 0.00ms ±0.52ms 1 +0.0%
Pressable nested 1.30ms 1.00ms ±1.70ms 1 +0.0%
Pressable multiple-10 3.27ms 3.00ms ±0.46ms 1 +0.0%
Pressable multiple-50 16.47ms 16.00ms ±2.20ms 1 +14.3%
Pressable multiple-100 20.00ms 13.00ms ±12.28ms 1 +8.3%

Modal

Scenario Mean Median StdDev Renders vs Baseline
Modal mount 0.20ms 0.00ms ±0.42ms 1 +0.0%
Modal unmount 0.10ms 0.00ms ±0.32ms 0 +0.0%
Modal rerender 0.50ms 0.50ms ±0.53ms 2 +Infinity%
Modal slide-animation 0.30ms 0.00ms ±0.48ms 1 +0.0%
Modal fade-animation 0.50ms 0.50ms ±0.53ms 1 +Infinity%
Modal transparent 0.30ms 0.00ms ±0.48ms 1 +0.0%
Modal with-callbacks 0.30ms 0.00ms ±0.48ms 1 +0.0%
Modal rich-content 2.10ms 2.00ms ±0.57ms 1 +0.0%
Modal with-accessibility 0.20ms 0.00ms ±0.42ms 1 +0.0%

Image

Scenario Mean Median StdDev Renders vs Baseline
Image mount 0.20ms 0.00ms ±0.42ms 1 +0.0%
Image unmount 0.10ms 0.00ms ±0.32ms 0 +0.0%
Image rerender 0.30ms 0.00ms ±0.48ms 2 +0.0%
Image with-resize-mode 0.10ms 0.00ms ±0.32ms 1 +0.0%
Image with-border-radius 0.20ms 0.00ms ±0.42ms 1 +0.0%
Image with-tint-color 0.20ms 0.00ms ±0.42ms 1 +0.0%
Image with-blur-radius 0.00ms 0.00ms ±0.00ms 1 +0.0%
Image with-accessibility 0.10ms 0.00ms ±0.32ms 1 +0.0%
Image multiple-10 1.27ms 1.00ms ±1.03ms 1 +0.0%
Image multiple-50 4.00ms 4.00ms ±0.53ms 1 +33.3%
Image multiple-100 8.73ms 8.00ms ±2.79ms 1 +0.0%

ActivityIndicator

Scenario Mean Median StdDev Renders vs Baseline
ActivityIndicator mount 0.10ms 0.00ms ±0.32ms 1 +0.0%
ActivityIndicator unmount 0.10ms 0.00ms ±0.32ms 0 +0.0%
ActivityIndicator rerender 0.30ms 0.00ms ±0.48ms 2 +0.0%
ActivityIndicator size-large 0.20ms 0.00ms ±0.42ms 1 +0.0%
ActivityIndicator size-small 0.10ms 0.00ms ±0.32ms 1 +0.0%
ActivityIndicator with-color 0.10ms 0.00ms ±0.32ms 1 +0.0%
ActivityIndicator not-animating 0.00ms 0.00ms ±0.00ms 1 +0.0%
ActivityIndicator with-accessibility 0.20ms 0.00ms ±0.42ms 1 +0.0%
ActivityIndicator multiple-10 1.20ms 1.00ms ±1.08ms 1 +0.0%
ActivityIndicator multiple-50 3.87ms 4.00ms ±0.52ms 1 +0.0%
ActivityIndicator multiple-100 9.80ms 10.00ms ±2.34ms 1 +42.9%

Switch

Scenario Mean Median StdDev Renders vs Baseline
Switch mount 0.40ms 0.00ms ±0.52ms 1 +0.0%
Switch unmount 0.00ms 0.00ms ±0.00ms 0 +0.0%
Switch rerender 0.50ms 0.50ms ±0.53ms 2 +0.0%
Switch value-true 0.30ms 0.00ms ±0.48ms 1 +0.0%
Switch disabled 0.30ms 0.00ms ±0.48ms 1 +0.0%
Switch custom-colors 0.30ms 0.00ms ±0.48ms 1 +0.0%
Switch on-value-change 0.10ms 0.00ms ±0.32ms 1 +0.0%
Switch with-accessibility 0.30ms 0.00ms ±0.48ms 1 +0.0%
Switch multiple-10 2.13ms 2.00ms ±1.46ms 1 +0.0%
Switch multiple-50 9.67ms 9.00ms ±2.50ms 1 +0.0%
Switch multiple-100 21.20ms 20.00ms ±5.75ms 1 +25.0%

Button

Scenario Mean Median StdDev Renders vs Baseline
Button mount 0.60ms 1.00ms ±0.52ms 1 +0.0%
Button unmount 0.00ms 0.00ms ±0.00ms 0 +0.0%
Button rerender 1.20ms 1.00ms ±0.42ms 2 +0.0%
Button disabled 0.50ms 0.50ms ±0.53ms 1 -50.0%
Button with-color 0.60ms 1.00ms ±0.52ms 1 +100.0%
Button with-accessibility 0.60ms 1.00ms ±0.52ms 1 +0.0%
Button multiple-10 6.80ms 6.00ms ±2.78ms 1 +0.0%
Button multiple-50 23.80ms 27.00ms ±8.75ms 1 +0.0%
Button multiple-100 20.33ms 19.00ms ±5.75ms 1 +0.0%

TextInput

Scenario Mean Median StdDev Renders vs Baseline
TextInput mount 0.30ms 0.00ms ±0.48ms 1 +0.0%
TextInput unmount 0.00ms 0.00ms ±0.00ms 0 +0.0%
TextInput rerender 0.40ms 0.00ms ±0.52ms 2 +0.0%
TextInput multiline 0.10ms 0.00ms ±0.32ms 1 +0.0%
TextInput with-value 0.10ms 0.00ms ±0.32ms 1 +0.0%
TextInput styled 0.10ms 0.00ms ±0.32ms 1 +0.0%
TextInput multiple-100 8.60ms 8.00ms ±2.26ms 1 +14.3%

View

Scenario Mean Median StdDev Renders vs Baseline
View mount 0.10ms 0.00ms ±0.32ms 1 +0.0%
View unmount 0.00ms 0.00ms ±0.00ms 0 +0.0%
View rerender 0.20ms 0.00ms ±0.42ms 2 +0.0%
View nested-50 4.40ms 4.00ms ±1.45ms 1 +33.3%
View nested-100 10.93ms 11.00ms ±2.66ms 1 +57.1%
View shadow 0.10ms 0.00ms ±0.32ms 1 +0.0%
View border-radius 0.10ms 0.00ms ±0.32ms 1 +0.0%
View nested-500 18.67ms 10.00ms ±14.65ms 1 +0.0%

Text

Scenario Mean Median StdDev Renders vs Baseline
Text mount 0.30ms 0.00ms ±0.48ms 1 +0.0%
Text unmount 0.00ms 0.00ms ±0.00ms 0 +0.0%
Text rerender 0.20ms 0.00ms ±0.42ms 2 +0.0%
Text long-1000 0.20ms 0.00ms ±0.42ms 1 +0.0%
Text nested 0.30ms 0.00ms ±0.48ms 1 +0.0%
Text styled 0.10ms 0.00ms ±0.32ms 1 +0.0%
Text multiple-100 10.07ms 9.00ms ±2.69ms 1 +28.6%

SectionList.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
SectionList native mount 5.46ms 5.24ms ±0.74ms 1 -19.4%

FlatList.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
FlatList native mount 5.37ms 5.04ms ±0.95ms 1 -45.4%

TouchableHighlight.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
TouchableHighlight native mount 1.48ms 1.41ms ±0.17ms 1 -32.7%

TouchableOpacity.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
TouchableOpacity native mount 1.94ms 1.78ms ±0.37ms 1 -43.4%

Pressable.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
Pressable native mount 1.60ms 1.59ms ±0.16ms 1 -36.5%

ScrollView.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
ScrollView native mount 3.45ms 3.32ms ±0.43ms 1 -17.9%

ActivityIndicator.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
ActivityIndicator native mount 1.50ms 1.29ms ±0.63ms 1 -48.2%

TextInput.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
TextInput native mount 2.71ms 2.37ms ±1.10ms 1 -42.0%

Switch.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
Switch native mount 1.37ms 1.24ms ±0.40ms 1 -28.6%

Button.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
Button native mount 1.95ms 1.82ms ±0.29ms 1 -29.9%

Modal.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
Modal native mount 1.41ms 1.16ms ±0.75ms 1 -4.6%

Image.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
Image native mount 1.79ms 1.77ms ±0.28ms 1 -21.5%

View.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
View native mount 1.35ms 1.20ms ±0.32ms 1 -16.3%

Text.native-perf-test.ts

Scenario Mean Median StdDev Renders vs Baseline
Text native mount 1.57ms 1.25ms ±0.63ms 1 -28.1%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants