Repository navigation
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.



Motivation
The goal of this PR is to address Material Design 3 guidelines for the Dialog component based on the official documentation as well as this issue. This PR also provides ability to avoid using previous compound components implementation in favor of props directly passed to the Dialog component.
Changes
Material Design 3:
Dialog.ScrollAreadivider border color usesoutline,Dialoghas now restricted minimum and maximum width set to280dpand560dp,DialogIconis the first component in theDialogand it had a total top margin of48dpinstead of24dp,Dialognow detects ifDialog.IconandDialog.Titleare present and if so enforcingDialog.Titleto be centered.Dialog:
Dialogcomponent now supportsicon,title,content,actions,scrollableprops instead of using compound components.Dialogstill uses compound components underneath to properly comply with Material Design specs as these components enforce proper styling,Dialogto ensure the new approach works as intended.Example:
Dialogscreen within Example app with the same dialogs as before but using new API to make sure they look and work as expected.Related issue
Test plan
Reviewers can through new Dialogs added to the Example app. They are duplicated as previous dialogs but they use new approach.