-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material-experimental): MDC-based version of dialog #19038
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
8fc11a3
to
569d482
Compare
src/material-experimental/mdc-dialog/_mdc-dialog-structure-overrides.scss
Outdated
Show resolved
Hide resolved
|
||
/** Starts the dialog open animation if enabled. */ | ||
private _startOpenAnimation() { | ||
this._animationStateChanged.emit({state: 'opening', totalTime: this._openAnimationDuration}); |
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.
It seems like all the places where this is used are stubbing out the interface for Angular's AnimationEvent
. Since this is an internal event, couldn't we change it to something that is more convenient to pass around?
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.
I don't see how this can be made more convenient. From my perspective, this interface is easy to use and understand. It's not too coupled to Angular's AnimationEvent
since it contains a specific state for the dialog (e.g. closed
, closing
and more).
Happy to change to something else if you have any ideas.
ebddaaf
to
2761cab
Compare
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
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.
Do we need to add an instance to the kitchen sink app too?
Hopefully @jelbourn can take a look at this next week. He's a lot more familiar with the dialog than I am
src/material-experimental/mdc-dialog/_mdc-dialog-structure-overrides.scss
Show resolved
Hide resolved
2761cab
to
8a25481
Compare
@mmalerba Addressed feedback. Thanks! Please have another look when you get a chance. |
LGTM, but @jelbourn still needs to take a look |
src/material-experimental/mdc-dialog/_dialog-legacy-padding.scss
Outdated
Show resolved
Hide resolved
@jelbourn Addressed feedback. Please have another look when you get a chance. |
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
We can change the way it does padding in a follow-up
39da5b4
to
3fd58d6
Compare
1a43f91
to
4c8ec93
Compare
Due to the focus changes (and thus some new triggered change detection changes), it's possible for If
|
4c8ec93
to
e2b7b81
Compare
We're close to getting this one in - mind fixing that browserstack test failure? |
e460f46
to
a5ced9f
Compare
Angular's `TestBed` by default only removes a test component from the document body and destructs individual component fixtures. It never destroys the test module properly, but always re-creates it. This means that providers are not necessarily cleaned up (could leak in memory) and component styles are not cleaned up / deduped. This results in thousands of style elements in the browsers. Ultimately causing significantly increased memory consumption and CPU blocking. This potentially leads to repeated crashes within browsers (as seen in BrowserStack and Saucelabs in the past). Initial testing of this change unveiled a reduction from 30min tests to 5min in BrowserStack. This is a signficant improvement and we should consider moving this change upstream with: angular/angular#31834. Benefits are: reduced test time; increased test/browser stability; isolated tests without leaking styles and services.
a5ced9f
to
4fa8053
Compare
This is finally green! While fixing tests in Safari and Firefox I found that we leak providers and styles between tests. Fixing this reduced average CI time for Browserstack from 30min to 5min! Previously browsers on BS and SL were close to crash (and sometimes did) due to too many style elements in the DOM (and too many providers being retained). |
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. |
Initial version of the MDC-based dialog.