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 all 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
3 changes: 2 additions & 1 deletion packages/fiori/src/NotificationListGroupItem.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
@click="{{_onHeaderToggleClick}}"
@keydown="{{_onkeydown}}"
role="button"
aria-expanded="{{_ariaExpanded}}"
aria-expanded="{{_expanded}}"
expanded="{{_expanded}}"
aria-controls="{{_id}}-notificationsList"
title="{{toggleIconAccessibleName}}">
<ui5-icon
Expand Down
2 changes: 1 addition & 1 deletion packages/fiori/src/NotificationListGroupItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class NotificationListGroupItem extends NotificationListItemBase {
return ids.join(" ");
}

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

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