Fix maxFontSizeMultiplier
prop on Text
and TextInput
components in new architecture
#47614
+215
−3
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.
Summary:
The
maxFontSizeMultiplier
prop forText
andTextInput
was not handled in Fabric / New Architecture as documented in #47499.Changelog:
[GENERAL] [FIXED] - Fix
maxFontSizeMultiplier
prop onText
andTextInput
components in Fabric / New ArchitectureTest Plan:
I have not added any automated tests for this change but try to do so if requested. I have however added examples to RN Tester for both the Text and TextInput components, as well as compared the behaviour with Paper / Old Architecture. Both on version 0.76.
Noticed now I didn't do exactly the same steps in both videos, oops! Be aware that reapplying changes made in the Settings are currently half-broken on the new architecture, thus I'm restarting the app on Android and iOS. But this issue is unrelated to my changes. I've tested on main branch and it has the same issue.
Here are comparison videos between Paper and Fabric on iOS after I've made my fix.
Text
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-11-13.at.19.39.32.mov
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-11-13.at.20.10.51.mov
TextInput
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-11-13.at.19.41.58.mov
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-11-13.at.20.12.15.mov