Skip to content

Commit

Permalink
refactor(ui5-shellbar): rename notificationCount property to notifica…
Browse files Browse the repository at this point in the history
…tionsCount (#3245)
  • Loading branch information
fifoosid authored May 18, 2021
1 parent 62e3ae8 commit 6495028
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions packages/fiori/src/ShellBar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
class="{{classes.items.search}} ui5-shellbar-button ui5-shellbar-search-button"
icon="sap-icon://search"
data-ui5-text="Search"
data-ui5-notification-count="{{notificationCount}}"
data-ui5-notifications-count="{{notificationsCount}}"
@click={{_handleSearchIconPress}}
aria-label="{{_searchText}}"
title="{{_searchText}}"
Expand All @@ -120,7 +120,7 @@
icon="{{this.icon}}"
title="{{this.title}}"
data-count="{{this.count}}"
data-ui5-notification-count="{{../notificationCount}}"
data-ui5-notifications-count="{{../notificationsCount}}"
data-ui5-external-action-item-id="{{this.refItemid}}"
data-ui5-stable="{{stableDomRef}}"
@click={{this.press}}
Expand All @@ -134,7 +134,7 @@
class="{{classes.items.notification}} ui5-shellbar-button ui5-shellbar-bell-button"
icon="sap-icon://bell"
data-ui5-text="Notifications"
data-ui5-notification-count="{{notificationCount}}"
data-ui5-notifications-count="{{notificationsCount}}"
@click={{_handleNotificationsPress}}
aria-label="{{_notificationsText}}"
title="{{_notificationsText}}"
Expand Down
6 changes: 3 additions & 3 deletions packages/fiori/src/ShellBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ const metadata = {
},

/**
* Defines the <code>notificationCount</code>,
* Defines the <code>notificationsCount</code>,
* displayed in the notification icon top-right corner.
* @type {string}
* @defaultvalue ""
* @public
*/
notificationCount: {
notificationsCount: {
type: String,
},

Expand Down Expand Up @@ -1018,7 +1018,7 @@ class ShellBar extends UI5Element {
}

get _notificationsText() {
return this.i18nBundle.getText(SHELLBAR_NOTIFICATIONS, this.notificationCount);
return this.i18nBundle.getText(SHELLBAR_NOTIFICATIONS, this.notificationsCount);
}

get _cancelBtnText() {
Expand Down
8 changes: 4 additions & 4 deletions packages/fiori/src/themes/ShellBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,11 @@ slot[name="profile"] {
margin-left: 1rem;
}

:host(:not([notification-count])) .ui5-shellbar-bell-button {
:host(:not([notifications-count])) .ui5-shellbar-bell-button {
position: relative;
}

:host([notification-count]:not([notification-count=""])) .ui5-shellbar-bell-button::before,
:host([notifications-count]:not([notifications-count=""])) .ui5-shellbar-bell-button::before,
.ui5-shellbar-button[data-count]::before {
position: absolute;
width: auto;
Expand All @@ -347,8 +347,8 @@ slot[name="profile"] {
box-sizing: border-box;
}

:host([notification-count]:not([notification-count=""])) .ui5-shellbar-bell-button::before {
content: attr(data-ui5-notification-count);
:host([notifications-count]:not([notifications-count=""])) .ui5-shellbar-bell-button::before {
content: attr(data-ui5-notifications-count);
}

.ui5-shellbar-button[data-count]::before {
Expand Down
2 changes: 1 addition & 1 deletion packages/fiori/test/pages/FCL.html
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@
<div class="col" slot="startColumn">
<ui5-shellbar
primary-title="Smart Store, New Yorks"
notification-count="4"
notifications-count="4"
show-notifications
show-product-switch
show-co-pilot
Expand Down
2 changes: 1 addition & 1 deletion packages/fiori/test/pages/ShellBar.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
primary-title="Product Title"
secondary-title="Second title"
second-title="Second Title"
notification-count="99+"
notifications-count="99+"
show-notifications
show-product-switch
show-co-pilot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h3>FlexibleColumnLayout - One Initial Column</h3>
<div class="col" slot="startColumn">
<ui5-shellbar
primary-title="Smart Store, New Yorks"
notification-count="4"
notifications-count="4"
show-notifications
show-product-switch
show-co-pilot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ <h3>NotificationListGroupItem In ShellBar</h3>
primary-title="Corporate Portal"
logo="../../../assets/images/sap-logo-svg.svg"
show-notifications
notification-count="6"
notifications-count="6"
>
</ui5-shellbar>

Expand Down Expand Up @@ -311,7 +311,7 @@ <h3>NotificationListGroupItem In ShellBar</h3>
primary-title="Corporate Portal"
logo="../../../assets/images/sap-logo-svg.svg"
show-notifications
notification-count="6"
notifications-count="6"
>
</ui5-shellbar>

Expand Down
4 changes: 2 additions & 2 deletions packages/fiori/test/samples/NotificationListItem.sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ <h3>NotificationListItem In ShellBar</h3>
primary-title="Corporate Portal"
logo="../../../assets/images/sap-logo-svg.svg"
show-notifications
notification-count="4"
notifications-count="4"
>
</ui5-shellbar>

Expand Down Expand Up @@ -231,7 +231,7 @@ <h3>NotificationListItem In ShellBar</h3>
primary-title="Corporate Portal"
logo="../../../assets/images/sap-logo-svg.svg"
show-notifications
notification-count="4"
notifications-count="4"
>
</ui5-shellbar>

Expand Down
12 changes: 6 additions & 6 deletions packages/fiori/test/samples/ShellBar.sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>ShellBar</h3>
id="shellbar"
primary-title="Corporate Portal"
secondary-title="secondary title"
notification-count="99+"
notifications-count="99+"
show-notifications
show-product-switch
show-co-pilot
Expand Down Expand Up @@ -66,7 +66,7 @@ <h3>ShellBar</h3>
id="shellbar"
primary-title="Corporate Portal"
secondary-title="secondary title"
notification-count="99+"
notifications-count="99+"
show-notifications
show-product-switch
show-co-pilot
Expand Down Expand Up @@ -149,7 +149,7 @@ <h3>ShellBar with search and notifications</h3>
primary-title="Corporate Portal"
secondary-title="secondary title"
show-notifications
notification-count="22"
notifications-count="22"
>
<ui5-avatar slot="profile" image="../../../assets/images/avatars/woman_avatar_5.png"></ui5-avatar>
<img slot="logo" src="../../../assets/images/sap-logo-svg.svg"/>
Expand All @@ -162,7 +162,7 @@ <h3>ShellBar with search and notifications</h3>
primary-title="Corporate Portal"
secondary-title="secondary title"
show-notifications
notification-count="22"
notifications-count="22"
>
<ui5-avatar slot="profile" image="../../../assets/images/avatars/woman_avatar_5.png"></ui5-avatar>
<img slot="logo" src="../../../assets/images/sap-logo-svg.svg"/>
Expand All @@ -181,7 +181,7 @@ <h3>ShellBar with product switch and CoPilot</h3>
show-co-pilot
show-product-switch
show-notifications
notification-count="22"
notifications-count="22"
>
<img slot="logo" src="../../../assets/images/sap-logo-svg.svg"/>
<ui5-avatar slot="profile" image="../../../assets/images/avatars/woman_avatar_5.png"></ui5-avatar>
Expand All @@ -195,7 +195,7 @@ <h3>ShellBar with product switch and CoPilot</h3>
show-co-pilot
show-product-switch
show-notifications
notification-count="22"
notifications-count="22"
>
<img slot="logo" src="../../../assets/images/sap-logo-svg.svg"/>
<ui5-avatar slot="profile" image="../../../assets/images/avatars/woman_avatar_5.png"></ui5-avatar>
Expand Down

0 comments on commit 6495028

Please sign in to comment.