Fix LocalDensity propagation into ComposeScene layers#2527
Merged
Fix LocalDensity propagation into ComposeScene layers#2527
LocalDensity propagation into ComposeScene layers#2527Conversation
ASalavei
reviewed
Oct 27, 2025
compose/ui/ui/src/uikitInstrumentedTest/kotlin/androidx/compose/ui/scroll/ScrollTest.kt
Show resolved
Hide resolved
ASalavei
reviewed
Oct 27, 2025
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/UIKitComposeSceneLayer.uikit.kt
Outdated
Show resolved
Hide resolved
…omposeHostingViewController.uikit.kt Co-authored-by: Andrei Salavei <[email protected]>
ASalavei
reviewed
Oct 28, 2025
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt
Show resolved
Hide resolved
ASalavei
reviewed
Oct 28, 2025
compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt
Show resolved
Hide resolved
ASalavei
approved these changes
Oct 28, 2025
mazunin-v-jb
approved these changes
Oct 28, 2025
Why is there a difference at all? We're really confused, that the LocalDensity is NOT passed to Dialog/Popup content on all platforms. |
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.
LocalDensityfrom the parent composition did not flow correctly into newly created compose scenes (Dialog/Popup) on iOS causing interaction and rendering issues. This PR fixes the bug by separating screen density (from the platform) and scene density (the current composition’sLocalDensity) inComposeSceneMediator. This PR also aligns iOS with Android. On AndroidDialogandPopupdo not inheritLocalDensityfrom the parent but re-seed density from the platform. On Desktop layers do inheritLocalDensityfrom the parent.Fixes CMP-8662 [iOS] Incorrect tap responses in a Dialog when LocalDensity is modified.
Testing
LocalDensityTesttest suiteKeyboardInsetsTestScrollTestThis should be tested by QA
Release Notes
Fixes - iOS
DialogwhenLocalDensityis modified