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
feat(module: notification): support top and bottom placement #7540
feat(module: notification): support top and bottom placement #7540
Conversation
This preview will be available after the AzureCI is passed. |
Codecov Report
@@ Coverage Diff @@
## master #7540 +/- ##
==========================================
- Coverage 91.75% 91.70% -0.05%
==========================================
Files 502 502
Lines 16699 16723 +24
Branches 2604 2605 +1
==========================================
+ Hits 15322 15336 +14
- Misses 1047 1057 +10
Partials 330 330
Continue to review full report at Codecov.
|
@@ -43,7 +43,7 @@ const NZ_NOTIFICATION_DEFAULT_CONFIG: Required<NotificationConfig> = { | |||
<nz-notification | |||
*ngFor="let instance of topLeftInstances" | |||
[instance]="instance" | |||
[placement]="config.nzPlacement" | |||
[placement]="instance.options.nzPlacement" |
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.
Here is the fix for the wrong direction of the notifactionMotion
@@ -172,6 +202,8 @@ export class NzNotificationContainerComponent extends NzMNContainerComponent { | |||
this.topRightInstances = this.instances.filter(m => m.options.nzPlacement === 'topRight' || !m.options.nzPlacement); | |||
this.bottomLeftInstances = this.instances.filter(m => m.options.nzPlacement === 'bottomLeft'); | |||
this.bottomRightInstances = this.instances.filter(m => m.options.nzPlacement === 'bottomRight'); | |||
this.topInstances = this.instances.filter(m => m.options.nzPlacement === 'top'); | |||
this.bottomInstances = this.instances.filter(m => m.options.nzPlacement === 'bottom'); |
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.
Maybe we can do these in one loop?
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.
ok
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.
updated!
055652d
to
afcbc0e
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! Thanks!
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #7389
What is the new behavior?
Does this PR introduce a breaking change?
Other information