Skip to content

Commit

Permalink
fix(ui5-li-notification-group): correct collapse button shape on Comp…
Browse files Browse the repository at this point in the history
…act mode (#8166)

The button should not chanage its shape when clicked.

Fixes #8059
  • Loading branch information
LidiyaGeorgieva committed Jan 25, 2024
1 parent 3666e56 commit 226d975
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/fiori/src/NotificationListGroupItem.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
>
<div class="ui5-nli-group-header">
<ui5-button
icon="navigation-right-arrow"
icon={{groupCollapsedIcon}}
design="Transparent"
@click="{{_onBtnToggleClick}}"
class="ui5-nli-group-toggle-btn"
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 @@ -206,6 +206,10 @@ class NotificationListGroupItem extends NotificationListItemBase {
return !this.collapsed;
}

get groupCollapsedIcon() {
return this.collapsed ? "navigation-right-arrow" : "navigation-down-arrow";
}

/**
* Event handlers
*
Expand Down
4 changes: 0 additions & 4 deletions packages/fiori/src/themes/NotificationListGroupItem.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
--_ui5-notification_item-border-raius: 0px;
}

:host(:not([collapsed])) .ui5-nli-group-toggle-btn {
transform: var(--_ui5_li_notification_group_toggle_btn_rotation);
}

:host([collapsed]) .ui5-nli-group-items {
display: none;
}
Expand Down
5 changes: 5 additions & 0 deletions packages/fiori/test/pages/NotificationListGroupItem.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<ui5-shellbar id="shellbar" primary-title="Product Title" show-notifications>
</ui5-shellbar>
<ui5-button id="btnCompact">Toggle sapUiSizeCompact</ui5-button>

<ui5-list id="notificationList" header-text="Notifications grouped">
<ui5-li-notification-group
Expand Down Expand Up @@ -308,6 +309,10 @@
wcToastBS.textContent = event.detail.item.titleText;
wcToastBS.show();
});

btnCompact.addEventListener("click", function() {
document.getElementsByTagName("body")[0].classList.toggle("sapUiSizeCompact");
});
</script>
</body>
</html>

0 comments on commit 226d975

Please sign in to comment.