Skip to content
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

fix: (Core) refactor Notifications to follow the latest design specs #5186

Merged
merged 12 commits into from
May 10, 2021

Conversation

InnaAtanasova
Copy link
Contributor

Please provide a link to the associated issue.

Please provide a brief summary of this pull request.

refactored Notifications component to reflect the latest css from Fundamental-styles

BREAKING CHANGES:

  • Changes in markup
  • Removed fd-notification-avatar directive
  • The directive fd-notification-actions is now a component
  • Removed fd-notification-text directive
  • Removed fd-notification-description directive
  • Removed fd-notification-metadata directive
  • Removed the Notifications From Object option together with the NotificationDefault.
  • Notifications Group is no longer a banner displayed in the right corner but displayed inside a popover triggered by clicking the bell icon in the shell bar at the top right of the screen.

Please check whether the PR fulfills the following requirements

Documentation checklist:

@InnaAtanasova InnaAtanasova requested a review from a team April 22, 2021 20:22
@InnaAtanasova InnaAtanasova self-assigned this Apr 22, 2021
@netlify
Copy link

netlify bot commented Apr 22, 2021

Deploy preview for fundamental-ngx ready!

Built with commit f30d5ff

https://deploy-preview-5186--fundamental-ngx.netlify.app

@InnaAtanasova InnaAtanasova force-pushed the feat/implement-new-notifications branch from 80712fa to 2584b5a Compare April 23, 2021 17:27
Comment on lines +8 to +9
.fd-notification--group .fd-notification__body:last-child {
border-bottom: var(--sapList_BorderWidth) solid var(--sapList_BorderColor);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fixed in PR in styles: SAP/fundamental-styles#2272

@droshev droshev requested review from N1XUS and aberikashvili May 2, 2021 15:41
Copy link
Contributor

@N1XUS N1XUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! I've commented couple of small issues I've noticed.

libs/core/src/lib/action-sheet/action-sheet.component.ts Outdated Show resolved Hide resolved
}

/** @hidden */
elementRef(): ElementRef<any> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need an explicit type argument "any" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. That's also how it's done in the other components:
Screen Shot 2021-05-03 at 11 06 51 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
But the generic type of ElementRef is any by default, so this code is copying the default behavior

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok...will remove it but it will be inconsistent with the rest of the app. Prob need to create an issue to refactor it for all components.

this._subscriptions.add(
this._router.events.pipe(
filter(event => event instanceof NavigationStart && this.closeOnNavigation)
).subscribe(event => this.notificationRef.dismiss())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event here is not used, do we need it in arguments?

@InnaAtanasova
Copy link
Contributor Author

@N1XUS thanks for your review, your comments have been addressed.

@mikerodonnell89
Copy link
Member

Notification w/ message strip - notification body has padding-top after message strip is dismissed so it looks a bit asymmetrical vertically
Screen Shot 2021-05-03 at 2 14 34 PM

I also noticed that if I open the "component as content" example then open the grouping example, then close the component as content popup, the grouping example closes as well. Might be a problem if multiple notifications are being displayed at once


/** @hidden */
private _listenRtl(): void {
if (this._rtlService) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component should also depend on the content density service and set button sizes accordingly

@InnaAtanasova
Copy link
Contributor Author

Notification w/ message strip - notification body has padding-top after message strip is dismissed so it looks a bit asymmetrical vertically
Screen Shot 2021-05-03 at 2 14 34 PM

I also noticed that if I open the "component as content" example then open the grouping example, then close the component as content popup, the grouping example closes as well. Might be a problem if multiple notifications are being displayed at once

This is a css issue. The body of the notification that has a message strip has a margin-top.

Copy link
Member

@mikerodonnell89 mikerodonnell89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After investigating, input actually seems to be the best way to deal with message strip margin

@droshev droshev force-pushed the feat/implement-new-notifications branch from 5403733 to abe32bd Compare May 7, 2021 03:01
@droshev droshev force-pushed the feat/implement-new-notifications branch from abe32bd to 6679d38 Compare May 7, 2021 10:07
@InnaAtanasova InnaAtanasova force-pushed the feat/implement-new-notifications branch from 0c59f20 to 0aa9056 Compare May 7, 2021 19:48
@droshev droshev force-pushed the feat/implement-new-notifications branch from 06b7372 to 0c59f20 Compare May 7, 2021 23:22
@droshev droshev self-requested a review May 10, 2021 14:58
@InnaAtanasova InnaAtanasova merged commit 5d2bf88 into main May 10, 2021
@InnaAtanasova InnaAtanasova deleted the feat/implement-new-notifications branch May 10, 2021 14:59
Seamoo13 pushed a commit that referenced this pull request May 24, 2021
…5186)

BREAKING CHANGE:
Changes in markup
Removed fd-notification-avatar directive
The directive fd-notification-actions is now a component
Removed fd-notification-text directive
Removed fd-notification-description directive
Removed fd-notification-metadata directive
Removed the Notifications From Object option together with the NotificationDefault.
Notifications Group is no longer a banner displayed in the right corner but displayed inside a popover triggered by clicking the bell icon in the shell bar at the top right of the screen.
N1XUS pushed a commit that referenced this pull request Jun 2, 2021
…5186)

BREAKING CHANGE:
Changes in markup
Removed fd-notification-avatar directive
The directive fd-notification-actions is now a component
Removed fd-notification-text directive
Removed fd-notification-description directive
Removed fd-notification-metadata directive
Removed the Notifications From Object option together with the NotificationDefault.
Notifications Group is no longer a banner displayed in the right corner but displayed inside a popover triggered by clicking the bell icon in the shell bar at the top right of the screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants