Skip to content

Comments

Migrate window insets padding modifiers from composed API to InsetsPaddingModifierNode#2572

Merged
svastven merged 32 commits intojb-mainfrom
svastven/migrate-insets-modifiers
Dec 4, 2025
Merged

Migrate window insets padding modifiers from composed API to InsetsPaddingModifierNode#2572
svastven merged 32 commits intojb-mainfrom
svastven/migrate-insets-modifiers

Conversation

@svastven
Copy link

@svastven svastven commented Nov 13, 2025

Migrates window insets padding modifiers from composed API to InsetsPaddingModifierNode. Provides PlatformWindowInsets through the root node modifier to child nodes required for creating window insets padding modifiers.

Fixes CMP-8953 Migrate non-Android Insets Padding Modifiers away from "Composed" API to "Modifier.Node"
Fixes CMP-8998 Migrate insets modifiers to InsetsPaddingModifierElement
Fixes CMP-9201 ModalBottomSheet padding interaction on iOS in CMP 1.10.0-alpha03

Testing

Adds test of recomposition behavior to WindowInsetsPaddingTests
Tested by existing tests

Release Notes

Fixes - iOS

  • Fix incorrectly consumed insets in ModalBottomSheet

Features - Multiple Platforms

  • Migrate window insets padding modifiers from composed API to InsetsPaddingModifierNode

Copy link

@ASalavei ASalavei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update release note - the PR not only fixes things, but also adds support for the new API

Copy link
Member

@MatkovIvan MatkovIvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API/features for 1.10 is already frozen. Blocking until creating a release branch

@svastven svastven requested a review from ASalavei December 1, 2025 13:22
runTestContext: CoroutineContext = EmptyCoroutineContext,
testTimeout: Duration = Duration.INFINITE,
semanticsOwnerListener: PlatformContext.SemanticsOwnerListener? = null,
windowInsets: PlatformWindowInsets? = null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that it's the right way to expose it to public (under annotation but anyway) testing API.

In general, I'd keep this out of scope for now. Our own tests have a number of examples of how to provide PlatformContext inside tests

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should only be as part of the internal API since the constructor is marked as internal API and also it can only be provided to the runInternalSkikoComposeUiTest which is marked internal. I followed similar approach as with the semanticsOwnerListener above, which can also be provided only in terms of the internal API.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, adding it here indeed doesn't mean that we'll need to support compatiblity forever.
But I still think that the existing pattern (an arg above) is not the right way to expose it.

We might change it in the future, so I won't block PR because of it

@MatkovIvan
Copy link
Member

Please update the API dump to make CI green. The diff should have only stable_prop things, not real API changes

@svastven svastven merged commit 9116061 into jb-main Dec 4, 2025
16 checks passed
@svastven svastven deleted the svastven/migrate-insets-modifiers branch December 4, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants