Repository navigation
Fix text truncation by updating Yoga to 3.2.2 - #289
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Yoga 3.2.1 can shrink a measured text node by one physical pixel at a fractional offset, causing a UILabel to truncate text that should fit. Update the minimum Yoga version to 3.2.2, which backports react/yoga#2040, while retaining the
.upToNextMinorrequirement (3.2.2..<3.3.0).Add a minimal regression test with “Balance” and a right-aligned “$36.50” UILabel, both using a fixed 17pt system font. In a 393pt-wide container, querying the intrinsic size before layout triggers the bug. The test uses UIKit’s actual measurements, with no spacing adjustments, measurement stubs, or collection view. It checks that the final label width is at least its intrinsic content width.
The commits introduce the regression test first, then update Yoga to fix it.
Validation
55ptbut is assigned approximately54.6667pt, losing one physical pixel at @3x.git diff --checkpasses.Visual comparison
The same layout rendered with a 17pt system font on an iOS 27.2 @3x simulator. Only the Yoga version changes. The measured amount width is 55pt in both cases.