Display the indicator even with one message in pinned message banner (#12946)
* Display the indicator even with one message * Update e2e tests
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
|
@ -80,7 +80,7 @@
|
||||||
grid-area: title;
|
grid-area: title;
|
||||||
font: var(--cpd-font-body-sm-regular);
|
font: var(--cpd-font-body-sm-regular);
|
||||||
color: var(--cpd-color-text-action-accent);
|
color: var(--cpd-color-text-action-accent);
|
||||||
height: 20px;
|
line-height: 20px;
|
||||||
|
|
||||||
.mx_PinnedMessageBanner_title_counter {
|
.mx_PinnedMessageBanner_title_counter {
|
||||||
font: var(--cpd-font-body-sm-semibold);
|
font: var(--cpd-font-body-sm-semibold);
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
.mx_PinnedMessageBanner_message {
|
.mx_PinnedMessageBanner_message {
|
||||||
grid-area: message;
|
grid-area: message;
|
||||||
font: var(--cpd-font-body-sm-regular);
|
font: var(--cpd-font-body-sm-regular);
|
||||||
height: 20px;
|
line-height: 20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -114,6 +114,10 @@
|
||||||
height: 63px;
|
height: 63px;
|
||||||
|
|
||||||
.mx_PinnedMessageBanner_content {
|
.mx_PinnedMessageBanner_content {
|
||||||
grid-template: "pinIcon message" auto;
|
grid-template: "indicators pinIcon message" auto;
|
||||||
|
|
||||||
|
.mx_PinnedMessageBanner_message {
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ export function PinnedMessageBanner({ room, permalinkCreator }: PinnedMessageBan
|
||||||
onClick={onBannerClick}
|
onClick={onBannerClick}
|
||||||
>
|
>
|
||||||
<div className="mx_PinnedMessageBanner_content">
|
<div className="mx_PinnedMessageBanner_content">
|
||||||
{!isSinglePinnedEvent && <Indicators count={eventCount} currentIndex={currentEventIndex} />}
|
<Indicators count={eventCount} currentIndex={currentEventIndex} />
|
||||||
<PinIcon width="20" className="mx_PinnedMessageBanner_PinIcon" />
|
<PinIcon width="20" className="mx_PinnedMessageBanner_PinIcon" />
|
||||||
{!isSinglePinnedEvent && (
|
{!isSinglePinnedEvent && (
|
||||||
<div className="mx_PinnedMessageBanner_title" data-testid="banner-counter">
|
<div className="mx_PinnedMessageBanner_title" data-testid="banner-counter">
|
||||||
|
|
|
@ -219,6 +219,14 @@ exports[`<PinnedMessageBanner /> should render a single pinned event 1`] = `
|
||||||
<div
|
<div
|
||||||
class="mx_PinnedMessageBanner_content"
|
class="mx_PinnedMessageBanner_content"
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
class="mx_PinnedMessageBanner_Indicators"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="mx_PinnedMessageBanner_Indicator mx_PinnedMessageBanner_Indicator--active"
|
||||||
|
data-testid="banner-indicator"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mx_PinnedMessageBanner_PinIcon"
|
class="mx_PinnedMessageBanner_PinIcon"
|
||||||
width="20"
|
width="20"
|
||||||
|
|