Skip to content

Commit 6495028

Browse files
authored
refactor(ui5-shellbar): rename notificationCount property to notificationsCount (#3245)
1 parent 62e3ae8 commit 6495028

9 files changed

+23
-23
lines changed

packages/fiori/src/ShellBar.hbs

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
class="{{classes.items.search}} ui5-shellbar-button ui5-shellbar-search-button"
105105
icon="sap-icon://search"
106106
data-ui5-text="Search"
107-
data-ui5-notification-count="{{notificationCount}}"
107+
data-ui5-notifications-count="{{notificationsCount}}"
108108
@click={{_handleSearchIconPress}}
109109
aria-label="{{_searchText}}"
110110
title="{{_searchText}}"
@@ -120,7 +120,7 @@
120120
icon="{{this.icon}}"
121121
title="{{this.title}}"
122122
data-count="{{this.count}}"
123-
data-ui5-notification-count="{{../notificationCount}}"
123+
data-ui5-notifications-count="{{../notificationsCount}}"
124124
data-ui5-external-action-item-id="{{this.refItemid}}"
125125
data-ui5-stable="{{stableDomRef}}"
126126
@click={{this.press}}
@@ -134,7 +134,7 @@
134134
class="{{classes.items.notification}} ui5-shellbar-button ui5-shellbar-bell-button"
135135
icon="sap-icon://bell"
136136
data-ui5-text="Notifications"
137-
data-ui5-notification-count="{{notificationCount}}"
137+
data-ui5-notifications-count="{{notificationsCount}}"
138138
@click={{_handleNotificationsPress}}
139139
aria-label="{{_notificationsText}}"
140140
title="{{_notificationsText}}"

packages/fiori/src/ShellBar.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ const metadata = {
6767
},
6868

6969
/**
70-
* Defines the <code>notificationCount</code>,
70+
* Defines the <code>notificationsCount</code>,
7171
* displayed in the notification icon top-right corner.
7272
* @type {string}
7373
* @defaultvalue ""
7474
* @public
7575
*/
76-
notificationCount: {
76+
notificationsCount: {
7777
type: String,
7878
},
7979

@@ -1018,7 +1018,7 @@ class ShellBar extends UI5Element {
10181018
}
10191019

10201020
get _notificationsText() {
1021-
return this.i18nBundle.getText(SHELLBAR_NOTIFICATIONS, this.notificationCount);
1021+
return this.i18nBundle.getText(SHELLBAR_NOTIFICATIONS, this.notificationsCount);
10221022
}
10231023

10241024
get _cancelBtnText() {

packages/fiori/src/themes/ShellBar.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,11 @@ slot[name="profile"] {
322322
margin-left: 1rem;
323323
}
324324

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

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

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

354354
.ui5-shellbar-button[data-count]::before {

packages/fiori/test/pages/FCL.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@
514514
<div class="col" slot="startColumn">
515515
<ui5-shellbar
516516
primary-title="Smart Store, New Yorks"
517-
notification-count="4"
517+
notifications-count="4"
518518
show-notifications
519519
show-product-switch
520520
show-co-pilot

packages/fiori/test/pages/ShellBar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
primary-title="Product Title"
108108
secondary-title="Second title"
109109
second-title="Second Title"
110-
notification-count="99+"
110+
notifications-count="99+"
111111
show-notifications
112112
show-product-switch
113113
show-co-pilot

packages/fiori/test/samples/FlexibleColumnLayout.sample.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h3>FlexibleColumnLayout - One Initial Column</h3>
4949
<div class="col" slot="startColumn">
5050
<ui5-shellbar
5151
primary-title="Smart Store, New Yorks"
52-
notification-count="4"
52+
notifications-count="4"
5353
show-notifications
5454
show-product-switch
5555
show-co-pilot

packages/fiori/test/samples/NotificationListGroupItem.sample.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ <h3>NotificationListGroupItem In ShellBar</h3>
176176
primary-title="Corporate Portal"
177177
logo="../../../assets/images/sap-logo-svg.svg"
178178
show-notifications
179-
notification-count="6"
179+
notifications-count="6"
180180
>
181181
</ui5-shellbar>
182182

@@ -311,7 +311,7 @@ <h3>NotificationListGroupItem In ShellBar</h3>
311311
primary-title="Corporate Portal"
312312
logo="../../../assets/images/sap-logo-svg.svg"
313313
show-notifications
314-
notification-count="6"
314+
notifications-count="6"
315315
>
316316
</ui5-shellbar>
317317

packages/fiori/test/samples/NotificationListItem.sample.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h3>NotificationListItem In ShellBar</h3>
160160
primary-title="Corporate Portal"
161161
logo="../../../assets/images/sap-logo-svg.svg"
162162
show-notifications
163-
notification-count="4"
163+
notifications-count="4"
164164
>
165165
</ui5-shellbar>
166166

@@ -231,7 +231,7 @@ <h3>NotificationListItem In ShellBar</h3>
231231
primary-title="Corporate Portal"
232232
logo="../../../assets/images/sap-logo-svg.svg"
233233
show-notifications
234-
notification-count="4"
234+
notifications-count="4"
235235
>
236236
</ui5-shellbar>
237237

packages/fiori/test/samples/ShellBar.sample.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h3>ShellBar</h3>
1717
id="shellbar"
1818
primary-title="Corporate Portal"
1919
secondary-title="secondary title"
20-
notification-count="99+"
20+
notifications-count="99+"
2121
show-notifications
2222
show-product-switch
2323
show-co-pilot
@@ -66,7 +66,7 @@ <h3>ShellBar</h3>
6666
id="shellbar"
6767
primary-title="Corporate Portal"
6868
secondary-title="secondary title"
69-
notification-count="99+"
69+
notifications-count="99+"
7070
show-notifications
7171
show-product-switch
7272
show-co-pilot
@@ -149,7 +149,7 @@ <h3>ShellBar with search and notifications</h3>
149149
primary-title="Corporate Portal"
150150
secondary-title="secondary title"
151151
show-notifications
152-
notification-count="22"
152+
notifications-count="22"
153153
>
154154
<ui5-avatar slot="profile" image="../../../assets/images/avatars/woman_avatar_5.png"></ui5-avatar>
155155
<img slot="logo" src="../../../assets/images/sap-logo-svg.svg"/>
@@ -162,7 +162,7 @@ <h3>ShellBar with search and notifications</h3>
162162
primary-title="Corporate Portal"
163163
secondary-title="secondary title"
164164
show-notifications
165-
notification-count="22"
165+
notifications-count="22"
166166
>
167167
<ui5-avatar slot="profile" image="../../../assets/images/avatars/woman_avatar_5.png"></ui5-avatar>
168168
<img slot="logo" src="../../../assets/images/sap-logo-svg.svg"/>
@@ -181,7 +181,7 @@ <h3>ShellBar with product switch and CoPilot</h3>
181181
show-co-pilot
182182
show-product-switch
183183
show-notifications
184-
notification-count="22"
184+
notifications-count="22"
185185
>
186186
<img slot="logo" src="../../../assets/images/sap-logo-svg.svg"/>
187187
<ui5-avatar slot="profile" image="../../../assets/images/avatars/woman_avatar_5.png"></ui5-avatar>
@@ -195,7 +195,7 @@ <h3>ShellBar with product switch and CoPilot</h3>
195195
show-co-pilot
196196
show-product-switch
197197
show-notifications
198-
notification-count="22"
198+
notifications-count="22"
199199
>
200200
<img slot="logo" src="../../../assets/images/sap-logo-svg.svg"/>
201201
<ui5-avatar slot="profile" image="../../../assets/images/avatars/woman_avatar_5.png"></ui5-avatar>

0 commit comments

Comments
 (0)