iOS support of maxFontSizeMultiplier #48480
Closed
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:
maxFontSizeMultiplier is not available in new architecture. This poses challenges for app developers when managing UI in the setting of large text.
[Bug]: maxFontSizeMultiplier is not being respected
Changelog:
[IOS] [ADDED] - Support maxFontSizeMultiplier in new architecture.
Test Plan:
1. Set
maxFontSizeMultiplierinTextSteps
maxFontSizeMultiplier1.2toText(Snippet 1)1.2in Display & Brightness[Snippet 1]
Expected behavior
Display text as
1.2sized2. Propagate
maxFontSizeMultiplierin nestedTextSteps
maxFontSizeMultiplier1.2to containerTextTexthasTextnodes as childrenmaxFontSizeMultiplierset (Snippet 2)1.2in Display & Brightness[Snippet 2]
Expected behavior
All texts within container
Textare displayed as sized1.23. Propagate
maxFontSizeMultiplierin nestedTextas sub-componentmaxFontSizeMultiplier1.2to containerTextTexthasTextWrapperas childrenTextWrappercontainsTextas sub-componentmaxFontSizeMultiplierset (Snippet 3)1.2in Display & Brightness[Snippet 3]
Expected behavior
All texts within container
Textare displayed as sized1.24. Propagate
maxFontSizeMultiplierin nestedTextmixed withViewmaxFontSizeMultiplier1.2to containerTextTexthasTextalongsideViewas childrenmaxFontSizeMultiplierset (Snippet 4)1.2in Display & Brightness[Snippet 4]
5. Set
maxFontSizeMultiplierinAnimated.TextmaxFontSizeMultiplier1.2toAnimated.Text(Snippet 5)1.2in Display & Brightness[Snippet 5]
Expected behavior
Display text as
1.2sized6. Set
maxFontSizeMultiplier0 in nestedTextoverride parent/global defaultmaxFontSizeMultiplier1.2to containerTextTexthasTextnodes as childrenmaxFontSizeMultiplier0maxFontSizeMultiplierset (Snippet 6)1.2in Display & Brightness[Snippet 6]
Expected behavior
Display text as system size for
'nested text two\n'Display as
1.2sized for the rest of the text