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(ui5-notification-list-group): group header hight is shorter when collapsed #9953

Merged
merged 5 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/fiori/src/NotificationListGroupItem.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@keydown="{{_onkeydown}}"
role="button"
aria-expanded="{{_ariaExpanded}}"
kskondov marked this conversation as resolved.
Show resolved Hide resolved
expanded="{{_expanded}}"
aria-controls="{{_id}}-notificationsList"
title="{{toggleIconAccessibleName}}">
<ui5-icon
Expand Down
4 changes: 4 additions & 0 deletions packages/fiori/src/NotificationListGroupItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ class NotificationListGroupItem extends NotificationListItemBase {
return !this.collapsed;
kskondov marked this conversation as resolved.
Show resolved Hide resolved
}

get _expanded() {
return !this.collapsed;
}

get _pressable() {
return false;
}
Expand Down
12 changes: 11 additions & 1 deletion packages/fiori/src/themes/NotificationListGroupItem.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

.ui5-nli-group-header {
height: calc(2.75rem + 2 * var(--_ui5-notification_group_header-margin));
height: 2.75rem;
position: sticky;
top: 0;
z-index: 90; /* the z-index of the busy-indicator is 99 and the header shouldn't be over it */
Expand All @@ -39,6 +39,11 @@
border-bottom: var(--_ui5-notification_group_header-border-bottom-width) solid var(--sapList_GroupHeaderBorderColor);
box-sizing: border-box;
cursor: pointer;
margin-bottom: var(--_ui5-notification_group_header-margin-expanded)
}

.ui5-nli-group-header[expanded="false"] {
margin-bottom: var(--_ui5-notification_group_header-margin);
}

/* The focus is on the whole group but should be visualized on the Group Header */
Expand All @@ -54,6 +59,11 @@
pointer-events: none;
}

:host([desktop]) .ui5-nli-focusable.ui5-nli-group-root:focus .ui5-nli-group-header[expanded="false"]::before,
.ui5-nli-focusable.ui5-nli-group-root:focus-visible .ui5-nli-group-header[expanded="false"]::before {
margin-bottom: var(--_ui5-notification_group_header-margin);
}

.ui5-nli-group-toggle-icon {
min-width: 1rem;
min-height: 1rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
--_ui5-notification_item-border-radius: 0px;
--_ui5-notification_group_header-border-bottom-width: 0.0625rem;
--_ui5-notification_group_header-margin: 0px;
--_ui5-notification_group_header-margin-expanded: 0.5rem;
--_ui5-notification_group_header-padding: 1rem 0.5rem;
--_ui5-notification_item-state-icon-padding: 0.625rem;
--_ui5-notification_item-border-bottom: var(--ui5-listitem-border-bottom);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
:root {
--_ui5-notification_item-border-radius: var(--sapTile_BorderCornerRadius);
--_ui5-notification_group_header-border-bottom-width: 0;
--_ui5-notification_group_header-margin: 0.75rem;
--_ui5-notification_group_header-padding: 0.5rem;
--_ui5-notification_item-state-icon-padding: 0.25rem;
--_ui5-notification_item-border-bottom: var(--sapList_BorderWidth) solid var(--sapList_BorderColor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
:root {
--_ui5-notification_item-border-radius: var(--sapTile_BorderCornerRadius);
--_ui5-notification_group_header-border-bottom-width: 0;
--_ui5-notification_group_header-margin: 0.75rem;
--_ui5-notification_group_header-padding: 0.5rem;
--_ui5-notification_item-state-icon-padding: 0.25rem;
--_ui5-notification_item-border-bottom: var(--sapList_BorderWidth) solid var(--sapList_BorderColor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
:root {
--_ui5-notification_item-border-radius: var(--sapTile_BorderCornerRadius);
--_ui5-notification_group_header-border-bottom-width: 0;
--_ui5-notification_group_header-margin: 0.75rem;
--_ui5-notification_group_header-padding: 0.5rem;
--_ui5-notification_item-state-icon-padding: 0.25rem;
--_ui5-notification_item-border-bottom: var(--sapList_BorderWidth) solid var(--sapList_BorderColor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
:root {
--_ui5-notification_item-border-radius: var(--sapTile_BorderCornerRadius);
--_ui5-notification_group_header-border-bottom-width: 0;
--_ui5-notification_group_header-margin: 0.75rem;
--_ui5-notification_group_header-padding: 0.5rem;
--_ui5-notification_item-state-icon-padding: 0.25rem;
--_ui5-notification_item-border-bottom: var(--sapList_BorderWidth) solid var(--sapList_BorderColor);
Expand Down