Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit max Dialog and Popup size by safe area on iOS #732

Merged
merged 8 commits into from Aug 8, 2023

Conversation

MatkovIvan
Copy link
Member

Proposed Changes

  • Limit max Dialog and Popup size by safe area on iOS
  • Extract shared calculations between Popup and Dialog to RootMeasurePolicy
  • Add usePlatformDefaultWidth parameter to PopupProperties

Testing

Test: run mpp demo, open max size Dialog

Before After
Screenshot 2023-08-04 at 17 54 23 Screenshot 2023-08-04 at 17 57 11

Comment on lines +64 to +68
actual class PopupProperties @ExperimentalComposeUiApi constructor(
actual val focusable: Boolean,
actual val dismissOnBackPress: Boolean,
actual val dismissOnClickOutside: Boolean
actual val dismissOnClickOutside: Boolean,
val usePlatformDefaultWidth: Boolean = false,
Copy link

Choose a reason for hiding this comment

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

Addition of a new argument (even with default value) will break binary backward compatibility on stable Desktop.

Copy link

Choose a reason for hiding this comment

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

Or this class doesn't exists in Compose Multiplatform 1.4.3 ?

Copy link

Choose a reason for hiding this comment

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

As I see this class doesn't exists in 1.4.3
So, we need to cherry pick this PR also to preparing branch of Compose Multiplatform 1.5.0 Release ?

Copy link
Collaborator

@igordmn igordmn left a comment

Choose a reason for hiding this comment

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

Looked only on the new API (usePlatformDefaultWidth) - looks good to me.

@MatkovIvan MatkovIvan merged commit bdb02dc into jb-main Aug 8, 2023
3 checks passed
@MatkovIvan MatkovIvan deleted the ivan.matkov/dialog-safe-area branch August 8, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants