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

Expect androidx.compose.material3.AlertDialog in common #710

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

MatkovIvan
Copy link
Member

Proposed Changes

Testing

Test: TBD

Issues Fixed

@MatkovIvan MatkovIvan requested a review from m-sasha July 26, 2023 09:00
@MatkovIvan MatkovIvan marked this pull request as ready for review August 1, 2023 08:30
@MatkovIvan MatkovIvan force-pushed the ivan.matkov/common-alertdialog3 branch from dd31f2f to 5f314b1 Compare August 4, 2023 07:37
@MatkovIvan MatkovIvan merged commit 8fbcd4e into jb-main Aug 4, 2023
3 checks passed
@MatkovIvan MatkovIvan deleted the ivan.matkov/common-alertdialog3 branch August 4, 2023 08:06
@QiXi
Copy link

QiXi commented Aug 12, 2023

After switching to material3.AlertDialog from 1.5.0-beta02
My dialogs have a width limit and setting the width to 720.dp no longer works

AlertDialog(modifier = Modifier.width(720.dp)){}

Now dialogs are limited in width, although using material.AlertDialog I could set a custom dialog width.

@MatkovIvan
Copy link
Member Author

MatkovIvan commented Aug 12, 2023

From spec:

Maximum width: 560dp

The code:

After switching

I'm not sure from what component you've switched, but current state looks as expected, behaves per spec and should be equal to Google's implementation (it's the same code actually).

Also please note that DialogProperties.usePlatformDefaultWidth is true by default and it limits dialog width too.

@QiXi
Copy link

QiXi commented Aug 13, 2023

Also please note that DialogProperties.usePlatformDefaultWidth is true by default and it limits dialog width too.

thanks, this solved my problem. I was not attentive enough to the properties of this flag.

igordmn pushed a commit that referenced this pull request Nov 15, 2023
…alog` in common (#710)

* Expect AlertDialog in common

* Revert Android formatting

* Add comment about binary compatibility
igordmn pushed a commit that referenced this pull request Nov 16, 2023
….AlertDialog` in common (#710)

* Expect AlertDialog in common

* Revert Android formatting

* Add comment about binary compatibility
igordmn pushed a commit that referenced this pull request Jan 30, 2024
* Expect AlertDialog in common

* Revert Android formatting

* Add comment about binary compatibility
copybara-service bot pushed a commit to androidx/androidx that referenced this pull request May 17, 2024
It's upstreaming of JetBrains#710.
This API is already available from common since Compose Multiplatform 1.5.0

Test: N/A
Relnote: Make `androidx.compose.material3.AlertDialog` available from common source set
Change-Id: Ia33f513f472f6d200de922fdef0fd2f73f62b007
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