Status Update
Comments
lp...@google.com <lp...@google.com> #2
Hi Nick!
TextField currently have no skinning, borders etc, and it let's the API users (i.e. FilledTextField) to define those. Even though hint (placeholder) is a common TextField feature, material had animations etc on that feature which made us believe that it highly depends on the design system to provide the hint, and foundation should ideally be independent of the design system.
Previously we had only 2 Textfield implementations, 1 on material, 1 in core. If that structured did hold, I would recommend against adding the placeholder to core.TextField. However now we have 3 of them :)
I added nona, matvei and lpf to the ticket to get their opinions.
ad...@google.com <ad...@google.com> #3
I agree with Siyamed's analysis here, the implementation of a placeholder is evidently something specific to a design system. If you aren't using the Material implementation of a text field, it seems reasonable for you to need to build your own placeholder implementation - I think there is too much complexity and room for customization with transitions etc for it to be possible to build a generic version that is flexible enough to support all use cases.
ap...@google.com <ap...@google.com> #4
Yes, I agree. Maybe we should add a sample to the documentation so that developers have something to begin with when they need to develop their own?
ha...@gmail.com <ha...@gmail.com> #5
Adding a sample makes sense to me. I thought we previously had it but right now I couldn't find it.
Nick does it sound good to you as well?
Description
Using the AlertDialog API as shown in the sample code here:https://cs.android.com/androidx/platform/tools/dokka-devsite-plugin/+/master:testData/compose/samples/material/samples/AlertDialogSample.kt;l=36 yields a dialog that extends all the way to the device screen edges as shown in the attached screenshot.
AlertDialogs should leave space near the edges as
android.app.AlertDialog
does.We should address this prior to 1.0 if we can; as-is it's seemingly mandatory to add a
Modifier.padding(24.dp)
to AlertDialog usages to avoid the edges of the screen.Other adaptive behavior for larger screens is out of scope for this change.