Skip to content

Fix ModalBottomSheetDialog content insets#2849

Draft
svastven wants to merge 3 commits intojb-mainfrom
svastven/bugfix/modal-bottom-sheet-insets
Draft

Fix ModalBottomSheetDialog content insets#2849
svastven wants to merge 3 commits intojb-mainfrom
svastven/bugfix/modal-bottom-sheet-insets

Conversation

@svastven
Copy link

Fix ModalBottomSheetDialog content insets by excluding platform insets from inner content

Fixes https://youtrack.jetbrains.com/issue/CMP-9846

Testing

Add ModalBottomSheetTest test suite

This should be tested by QA

Release Notes

Fixes - iOS

  • Fix ModalBottomSheetDialog content inset calculation

dismissOnClickOutside = properties.shouldDismissOnClickOutside,
usePlatformDefaultWidth = false,
usePlatformInsets = false,
usePlatformInsets = true,
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't look correct to me. The dialog itself should remain "full screen". Insets should work correctly with usePlatformInsets = false.

It seems that the fix should be on lower levels without touching material3 module

Copy link
Member

Choose a reason for hiding this comment

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

Confirmed that it breaks basic usage even in mpp

jb-main #2849
Image Image
Image Image

dismissOnClickOutside = properties.shouldDismissOnClickOutside,
usePlatformDefaultWidth = false,
usePlatformInsets = false,
usePlatformInsets = true,
Copy link
Member

Choose a reason for hiding this comment

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

Confirmed that it breaks basic usage even in mpp

jb-main #2849
Image Image
Image Image

@svastven
Copy link
Author

@MatkovIvan thanks for the example. That does not look correct. We could have some test when this behavior is not met. I will add it and investigate deeper.

@svastven svastven requested review from ASalavei and removed request for ASalavei March 11, 2026 10:23
@svastven svastven marked this pull request as draft March 11, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants