-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(cdk-experimental/dialog): rewrite experimental dialog #24759
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
Conversation
656ea61
to
0a7ff56
Compare
0a7ff56
to
41bb9dc
Compare
41bb9dc
to
4ca7fef
Compare
Rewrites most of the CDK experimental dialog to prepare it for public release. The changes were largely informed by implementing `material/dialog`, `material-experimental/mdc-dialog` and `material/bottom-sheet` using the new API, however the API can be used directly without having to be wrapped. Overview of the changes: * The classes for the dialog container, dialog config and dialog data aren't provided using DI anymore. The previous approach could've been a problem for apps that use multiple different versions of a CDK-based dialog. * Several fixes from the Material dialog that were never backported to the CDK version have been incorporated. * All animations and styles have been removed from the CDK dialog since they were going to be difficult to override by users. Custom animations can be achieved by extending the dialog container class. * The public API has been cleaned up to avoid some of the issues that were inherited from the Material dialog. * A demo has been added to the dev app. Example of how the new APIs was used to implement the Material components: 446a552.
4ca7fef
to
0eb132e
Compare
All of the feedback should be implemented now. In the last push I also ended up moving around the generic parameters of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/** Alternate `ComponentFactoryResolver` to use when resolving the associated component. */ | ||
componentFactoryResolver?: ComponentFactoryResolver; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the Material dialog need to pass it through, though? Isn't it the same to use this vs. instantiating the component directly? (which admittedly would require a code change in the portal, but we should probably do that anyway?)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Rewrites most of the CDK experimental dialog to prepare it for public release. The changes were largely informed by implementing
material/dialog
,material-experimental/mdc-dialog
andmaterial/bottom-sheet
using the new API, however the API can be used directly without having to be wrapped. Overview of the changes:Example of how the new APIs was used to implement the Material components: crisbeto@446a552.