Repository navigation
Report font scale changes to JS while the host stays resumed (#60497) - #60497
Merged
Merged
Conversation
|
@ww1321 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D135575916. |
javache
approved these changes
Dec 2, 2026
javache
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
…0497) Summary: `DeviceInfoModule` caches the font scale and re-reads it only in `onHostResume`. When the system font scale changes while the app stays resumed, `ReactHostImpl.onConfigurationChanged` re-lays out the native views at the new scale, but JS never receives `didUpdateDimensions`. `Dimensions`, `useWindowDimensions().fontScale` and `PixelRatio.getFontScale()` keep the old value, so a JS layout that multiplies by the font scale clips text that has already grown natively. An app stays resumed through a font scale change when it is visible next to the system settings, for example in multi-window. `ReactHostImpl.onConfigurationChanged` now asks `DeviceInfoModule` to re-read the font scale, and the module emits `didUpdateDimensions` when the value changed. Changelog: [Android][Fixed] - Emit `didUpdateDimensions` when the font scale changes while the app stays resumed Reviewed By: javache Differential Revision: D135575916 Signed-off-by: Wei Wang <ww1@meta.com>
ww1321
force-pushed
the
export-D135575916
branch
from
December 2, 2026 21:04
df7b9a2 to
2aa0f40
Compare
Collaborator
|
This pull request was successfully merged by @ww1321 in 1791386 When will my fix make it into a release? | How to file a pick request? |
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.
Summary:
DeviceInfoModulecaches the font scale and re-reads it only inonHostResume. When the system font scale changes while the app stays resumed,ReactHostImpl.onConfigurationChangedre-lays out the native views at the new scale, but JS never receivesdidUpdateDimensions.Dimensions,useWindowDimensions().fontScaleandPixelRatio.getFontScale()keep the old value, so a JS layout that multiplies by the font scale clips text that has already grown natively.An app stays resumed through a font scale change when it is visible next to the system settings, for example in multi-window.
ReactHostImpl.onConfigurationChangednow asksDeviceInfoModuleto re-read the font scale, and the module emitsdidUpdateDimensionswhen the value changed.Changelog:
[Android][Fixed] - Emit
didUpdateDimensionswhen the font scale changes while the app stays resumedReviewed By: javache
Differential Revision: D135575916