Repository navigation
feat(dialog)!: replace children with title, content and actions props - #5072
Conversation
8562995 to
7be180f
Compare
|
The MD3 corrections here should all land - divider colour, the 280/560 width clamp, the icon margin, the centred headline. What I'd like to reconsider is replacing |
|
Also @kachmashk could you resolve the comments that've been addressed? 🙏 |
e2db9f1 to
a0fc3b7
Compare
|
Waiting for a #5076 to be closed. |
|
#5094 removes docs from the repo, can you remove them from this PR? 🙏 |
|
@kachmashk ☝️ and we've got conflicts |
|
Heads up - #5125 is reworking |
The surface stays a dialog, but the prop lands together with the Dialog wiring in callstack#5072 rather than half-done here.
|
Review by Claude The new WebSteps: open the example app at 1280px width, go to Dialog, press "With icon". iOSSteps: rotate the device to landscape, go to Dialog, press "With icon". AndroidSteps: turn on RTL in the drawer, rotate the device to landscape, go to Dialog, press "With icon". |
satya164
left a comment
There was a problem hiding this comment.
Review by Claude
See the inline comments. Also, no test covers the new icon prop or the centered title when an icon is present. A test that renders icon with title and checks textAlign: 'center' on the title would catch a regression. (via Claude, verify if it makes sense)
4f7fa68 to
1ef4e76
Compare
7a23784 to
687c821
Compare
Stoneski93
left a comment
There was a problem hiding this comment.
Thanks for the fixes! Could you add tests for them? One for an icon without a title (content shouldn't get marginTop: 24), one for an icon with a title (title has textAlign: 'center'), and one for titleProps overriding the title style.
87a8236 to
2fbe044
Compare
With children gone, Dialog.Icon, Dialog.Title, Dialog.Content, Dialog.Actions and Dialog.ScrollArea had no supported place: content is already wrapped in Dialog.Content. Drop the statics and their docs pages, and test the actions through the actions prop.
Say that Dialog.Icon, Dialog.Title, Dialog.Content, Dialog.Actions and Dialog.ScrollArea were removed, map Dialog.ScrollArea to scrollable, and retitle the Dialog.Actions section now that the part is gone.
DialogActionsProps and DialogIconProps describe nothing public now that the parts are internal. The parts' screenshots and theme color entries have no docs page left, so fold the icon and divider colors into Dialog's entry, which now names the container's surfaceContainerHigh.



Motivation
Brings Dialog to the Material 3 spec and replaces its compound children with props, as #4933 proposes. Dialog takes
icon,title,contentandactions, plusscrollablefor long content. It is 280dp to 560dp wide and centered, centers the title under an icon, and moves the scroll area divider tooutlineVariant.Breaking:
Dialogno longer renderschildren. The Dialog section of the migration guide shows the move.Related issue
#4933
Screenshots / Videos
Test plan
In the example app, open each dialog on the Dialog screen on web, iOS and Android, in portrait and landscape, and once with RTL on.