[Stats Revamp] Recalculate the height of Insights Update prompt header when dynamic text size changes #19819
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.
Fixes #19720
Description
Fixing Insights Update prompt header not adapting to dynamic text size changes. This is a minor issue since the view does adapt to dynamic type and the bug only happens when dynamic type changes when the view is open.
The issue happens because Insights Update uses a more advanced
CollapsableHeaderViewControllerwhich has more complex header height calculations that are not recalculated when the dynamic text changes.The solution is to manually ask to layout header when
traitCollectionDidChangeevent is triggered by the systemTesting instructions
Enable "New Appearance for Stats" and "New Cards for Stats Insights" feature flags
Case 1:
Regression Notes
None, the changes are isolated
PR submission checklist:
RELEASE-NOTES.txtif necessary.Images & Videos
Before
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2022-12-28.at.13.55.25.mp4
After
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2022-12-28.at.14.55.09.mp4