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

feat(core): update Notifications to latest design #12476

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

InnaAtanasova
Copy link
Contributor

@InnaAtanasova InnaAtanasova commented Sep 26, 2024

Related Issue(s)

closes none

Description

Updated to incorporate the latest fundamental-styles for Notifications.

NOTE: Keyboard interaction for the Notification List is currently missing and will be implemented in a future update.
NOTE: End-to-end tests for Notifications have been removed.

BREAKING CHANGES:

  • Significant markup updates for both Notification and Notification Group components.
  • Removed the fd-notification-indicator directive. The Icon component with color is now used for priority/status indicators.

Before:

<fd-notification-header>
    <div fd-notification-indicator type="success"></div>
    <h2 fd-notification-title [unread]="true">...</h2>
</fd-notification-header>

After:

<fd-notification-header>
    <fd-icon glyph="error" color="negative"></fd-icon>
    <h4 fd-notification-title [unread]="true">...</h4>
</fd-notification-header>
  • Notification Message Strip is now placed inside a container div with the fd-notification-message-strip-container directive.

Before:

<fd-notification>
    <fd-message-strip type="warning" marginBottom="1rem"></fd-message-strip>
    ........
</fd-notification>

After:

<fd-notification>
    <div fd-notification-message-strip-container>
        <fd-message-strip type="error"> A dismissible error message strip. </fd-message-strip>
    </div>
   .....
</fd-notification>
  • The mobile property has been removed from fd-notification, previously used for displaying Notifications in Popover dialogs.
  • Introduced the new fd-notification-popover directive, which wraps the Notification Group content inside the Popover body.
  • Notification Groups are no longer displayed in Tabs.
  • The Notification Popover now includes a Toolbar for user-defined actions (e.g., clear all, settings, sort).
  • Message Strip can now be placed inside the Notification Popover, wrapped in a div with the fd-notification-message-strip directive applied.
  • Added the new fd-notification-list directive, applied to a ul element, for holding Notification Groups.
  • Removed the expanded property from fd-notification-group-header.
  • Introduced the new fd-notification-group-header-title directive for the Notification Group title.
  • Removed the fd-notification-limit component. Use the new fd-notification-group-growing-item component instead.
  • Removed the fd-notification-limit-title directive. Use the fd-notification-group-growing-item-title directive.
  • Removed the fd-notification-limit-description directive.

Before:

<fd-notification-group>
    <fdp-icon-tab-bar>
        <fdp-icon-tab-bar-tab>
            <fd-notification-group-list>
                <fd-notification-group-header [(expanded)]="...">
                    <fd-notification-header>
                        <h2 fd-notification-title [unread]="true">...</h2>
                    </fd-notification-header>
                    <fd-notification-actions>...</fd-notification-actions>
                </fd-notification-group-header>
                <fd-notification-body>...</fd-notification-body>
                <fd-notification-limit>
                    <h1 fd-notification-limit-title>...</h1>
                    <p fd-notification-limit-description>...</p>
                </fd-notification-limit>
            </fd-notification-group-list>
        </fdp-icon-tab-bar-tab>
        ....
    </fdp-icon-tab-bar>
</fd-notification-group>

After:

<fd-popover-body>
    <div fd-notification-popover>
        <fd-toolbar>...</fd-toolbar>
        <div fd-notification-message-strip>
            <fd-message-strip type="warning">...</fd-message-strip>
        </div>
        <ul fd-notification-list>
            <fd-notification-group [expanded]="true">
                <fd-notification-group-header>
                    <span fd-notification-group-header-title>...</span>
                </fd-notification-group-header>
                <fd-notification-group-list>
                    <fd-notification>...</fd-notification>
                </fd-notification-group-list>
                <fd-notification-group-growing-item>
                    <span fd-notification-group-growing-item-title>More</span>
                </fd-notification-group-growing-item>
            </fd-notification-group>
            
            <fd-notification-group>...</fd-notification-group>
        </ul>
    </div>
</fd-popover-body>

Copy link

netlify bot commented Sep 26, 2024

Deploy Preview for fundamental-ngx ready!

Name Link
🔨 Latest commit 41e053b
🔍 Latest deploy log https://app.netlify.com/sites/fundamental-ngx/deploys/66fd4ab5f1e57800088ebd30
😎 Deploy Preview https://deploy-preview-12476--fundamental-ngx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Sep 26, 2024

Visit the preview URL for this PR (updated for commit 41e053b):

https://fundamental-ngx-gh--pr12476-feat-notifications-l-lz5yn6lx.web.app

(expires Sat, 05 Oct 2024 13:34:16 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 41b993ee8e451bd7c6770b342ce142dc886eacff

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.

Looks good, couple of comments on things that need to be prepared for translations. Looks like most of the directives/components leave it to the application developer to handle all the logic so there is not much to test here. But it is a lot of breaking changes so I hope we don't have too many devs using the previous implementation

* aria-label attribute for the element
* Default is set to 'Notifications'
*/
ariaLabel = input('Notifications');
Copy link
Member

Choose a reason for hiding this comment

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

This should be prepared for translation

* Title for the group header
* default value: "Expand/Collapse"
*/
title = input('Expand/Collapse');
Copy link
Member

Choose a reason for hiding this comment

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

another one that needs translation

}
}
readonly ariaDescription = computed(
() => `Notification group ${this.groupHeader()?.expanded() ? 'expanded' : 'collapsed'}`
Copy link
Member

Choose a reason for hiding this comment

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

another in need of translation

Copy link
Contributor

@dpavlenishvili dpavlenishvili left a comment

Choose a reason for hiding this comment

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

everything looks good, just need localization changes as Mike mentioned and thats it. Just in case, i approve it.

@droshev droshev force-pushed the feat/notifications-latest-update branch from 449e963 to 41e053b Compare October 2, 2024 13:29
@droshev droshev merged commit 3a2ab29 into main Oct 2, 2024
17 of 18 checks passed
@droshev droshev deleted the feat/notifications-latest-update branch October 2, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants