Skip to content

Commit b501153

Browse files
authored
fix: correct responsive padding in some consumers of popups (#4926)
Affected components: NotificationListItem NotificationListGroupItem SideNavigation Wizard Consumers of ResponsivePopover - footer padding is corrected Added left/center aligned titles to the Popover and Dialogs for the SAP Quartz (centered in Belize) themes when the property headerText is provided. Improved some samples. Part of #4870
1 parent a85fd1e commit b501153

24 files changed

+94
-140
lines changed

packages/fiori/src/NotificationListItemBase.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import "@ui5/webcomponents-icons/dist/message-warning.js";
1212
import "@ui5/webcomponents-icons/dist/overflow.js";
1313

1414
// Templates
15-
import NotifactionOverflowActionsPopoverTemplate from "./generated/templates/NotifactionOverflowActionsPopoverTemplate.lit.js";
15+
import NotificationOverflowActionsPopoverTemplate from "./generated/templates/NotificationOverflowActionsPopoverTemplate.lit.js";
1616

1717
// Styles
18-
import NotifactionOverflowActionsPopoverCss from "./generated/themes/NotifactionOverflowActionsPopover.css.js";
18+
import NotificationOverflowActionsPopoverCss from "./generated/themes/NotificationOverflowActionsPopover.css.js";
1919

2020
/**
2121
* @public
@@ -145,11 +145,11 @@ class NotificationListItemBase extends ListItemBase {
145145
}
146146

147147
static get staticAreaTemplate() {
148-
return NotifactionOverflowActionsPopoverTemplate;
148+
return NotificationOverflowActionsPopoverTemplate;
149149
}
150150

151151
static get staticAreaStyles() {
152-
return NotifactionOverflowActionsPopoverCss;
152+
return NotificationOverflowActionsPopoverCss;
153153
}
154154

155155
static priorityIconsMappings() {

packages/fiori/src/themes/NotifactionOverflowActionsPopover.css

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.ui5-notification-overflow-list {
2+
display: flex;
3+
flex-direction: column;
4+
}
5+
6+
.ui5-notification-overflow-popover::part(content) {
7+
padding: var(--_ui5-notification-overflow-popover-padding);
8+
}

packages/fiori/src/themes/SideNavigationPopover.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@
77
border-bottom-left-radius: var(--_ui5_side_navigation_overflow_border_radius);
88
border-bottom-right-radius: var(--_ui5_side_navigation_overflow_border_radius);
99
}
10+
11+
.ui5-side-navigation-popover::part(content) {
12+
padding: 0;
13+
}

packages/fiori/src/themes/WizardPopover.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
padding: 0;
1010
}
1111

12+
.ui5-responsive-popover-footer {
13+
display: flex;
14+
justify-content: flex-end;
15+
padding: 0.25rem 0;
16+
width: 100%;
17+
}
18+
1219
.ui5-wizard-popover .ui5-wizard-responsive-popover-list [ui5-button] {
1320
width: 200px;
1421
}

packages/fiori/test/pages/NotificationListGroupItem.html

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<script src="../../resources/bundle.esm.js" type="module"></script>
1111
<script nomodule src="../../resources/bundle.es5.js"></script>
1212

13-
<script>// delete Document.prototype.adoptedStyleSheets;</script>
1413
<link rel="stylesheet" type="text/css" href="styles/NotificationListGroupItem.css">
1514
</head>
1615

@@ -19,36 +18,6 @@
1918
<ui5-shellbar id="shellbar" primary-title="Product Title" show-notifications>
2019
</ui5-shellbar>
2120

22-
<br/><br/>
23-
24-
<h3>Properties</h3>
25-
<ul>
26-
<li>titleText</li>
27-
<li>priority (default: "None")</li>
28-
<li>collapsed (default: "false")</li>
29-
<li>show-close (default: "false")</li>
30-
<li>show-counter (default: "false")</li>
31-
<li>read (default: "false")</li>
32-
</ul>
33-
34-
<h3>Slots</h3>
35-
<ul>
36-
<li>items (default)</li>
37-
<li>actions</li>
38-
</ul>
39-
40-
<h3>Events</h3>
41-
<ul>
42-
<li>close</li>
43-
<li>toggle</li>
44-
</ul>
45-
46-
<h3>Events on ui5-list level</h3>
47-
<ul>
48-
<li>itemClose</li>
49-
<li>itemToggle</li>
50-
</ul>
51-
5221
<ui5-list id="notificationList" header-text="Notifications grouped">
5322
<ui5-li-notification-group
5423
show-close
@@ -331,8 +300,6 @@ <h3>Events on ui5-list level</h3>
331300
}, 2000);
332301
});
333302

334-
335-
336303
shellbar.addEventListener("ui5-notifications-click", function(event) {
337304
event.preventDefault();
338305
notificationsPopover.showAt(event.detail.targetRef);

packages/fiori/test/pages/NotificationListItem.html

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
<script src="../../resources/bundle.esm.js" type="module"></script>
1111
<script nomodule src="../../resources/bundle.es5.js"></script>
1212

13-
<script>// delete Document.prototype.adoptedStyleSheets;</script>
14-
1513
<link rel="stylesheet" type="text/css" href="styles/NotificationListItem.css">
1614
</head>
1715

@@ -20,37 +18,6 @@
2018
<ui5-shellbar id="shellbar" primary-title="Product Title" show-notifications>
2119
</ui5-shellbar>
2220

23-
<br/><br/>
24-
25-
<h3>Properties</h3>
26-
<ul>
27-
<li>titleText</li>
28-
<li>wrappingType (default: "None")</li>
29-
<li>priority (default: "None")</li>
30-
<li>read (default: "false")</li>
31-
<li>show-close (default: "false")</li>
32-
</ul>
33-
34-
<h3>Slots</h3>
35-
<ul>
36-
<li>default (description)</li>
37-
<li>avatar</li>
38-
<li>actions</li>
39-
<li>footnotes</li>
40-
</ul>
41-
42-
<h3>Events</h3>
43-
<ul>
44-
<li>click</li>
45-
<li>close</li>
46-
</ul>
47-
48-
<h3>Events on ui5-list level</h3>
49-
<ul>
50-
<li>itemClick</li>
51-
<li>itemClose</li>
52-
</ul>
53-
5421
<ui5-list id="notificationList" header-text="Notifications titleText and content 'truncates'">
5522

5623
<ui5-li-notification

packages/main/src/Popover.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{{#*inline "afterContent"}}
1818
{{#if _displayFooter}}
1919
{{#if footer.length }}
20-
<footer class="ui5-popup-footer-root" part="footer">
20+
<footer class="ui5-popup-footer-root" part="footer">
2121
<slot name="footer"></slot>
2222
</footer>
2323
{{/if}}

packages/main/src/themes/PopupsCommon.css

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@
6464
box-sizing: border-box;
6565
}
6666

67-
6867
:host([header-text]) .ui5-popup-header-text {
69-
padding: 0 0.25rem;
7068
text-align: center;
7169
min-height: var(--_ui5_popup_default_header_height);
7270
max-height: var(--_ui5_popup_default_header_height);
@@ -78,6 +76,10 @@
7876
display: inline-block;
7977
}
8078

79+
:host([header-text]) .ui5-popup-header-root {
80+
justify-content: var(--_ui5_popup_header_prop_header_text_alignment);
81+
}
82+
8183
:host(:not([header-text])) .ui5-popup-header-text {
8284
display: none;
8385
}
@@ -100,13 +102,8 @@
100102
padding: 1rem var(--_ui5_popup_content_padding_xl);
101103
}
102104

103-
.ui5-popup-footer-root {
104-
justify-content: end;
105-
}
106-
107105
.ui5-popup-header-root {
108106
background: var(--sapPageHeader_Background);
109-
justify-content: start;
110107
}
111108

112109
/*** Responsive paddings for the Header and Footer ***/

0 commit comments

Comments
 (0)