Seems also the dialog change to full size was made...
# compose
t
Seems also the dialog change to full size was made experimental but as full size by default, breaking previous default value and require optin to experimental to return to normal status :(
👀 1
a
Does it affects AlertDialog?
t
Yes it requires to add
Copy code
properties = DialogProperties(
            usePlatformDefaultWidth = true
        )
The problem is that it's annotated as ExperimentalAPI so you also need
@OptIn(ExperimentalComposeUiApi::class)
and the rest of the OptIn standard things to not get warnings / errors on production builds.
👍🏻 1
👍 1
a
that's awful!
l
@Mihai Popa
a
the edge to edge behavior of AlertDialog in the wake of this seems like we should consider it unintentional
taking a look at a quick fix. Arbitrary dialog content should probably still be able to measure edge to edge since there's a lot of usages for that sort of thing
t
Should not just the default be true, and going edge to edge still experimental when overriding the param?
l
We might need to set a fixed width in AlertDialog, I think there’s a bug for that somewhere - since AlertDialog has a default, but generic dialogs shouldn’t
t
On android by default alerts are wrap content with minwidth that depends on device screen + grow up to max size with margins also depending on device screen size
Since the full screen one by default have 0 padding I'm wondering @Adam Powell is there something existing / planned to publish those kind of values that depends on device screen size on Material design?
a
On android by default alerts are wrap content with
yes, I'm aware, I've spent many years getting to debug that code 😄
compose's layout system really doesn't like the remeasuring/TOO_SMALL flag-based handshaking that the ViewRoot path does
and in particular it doesn't report TOO_SMALL at all, so with the old behavior you wouldn't get appropriately sized dialogs on large screen devices
(it would never ratchet wider)
it was always an android thing since Honeycomb; Material just sort of inherited the behavior and didn't have a real opinion on it
t
Alert dialogs content can vary a lot 😞 Does it's modifier support size? And jumping back to the other questions, what is the proper way to have dynamic values based on current screendp / orientation like we did with the values-xxxx
While previous default way did work mostly ok. I can't see a nice way to deal with a simple 5 words yes / no dialog and one with a longer text that still should not take the full screen in tablets landscape but still be larger than on phone.