Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Display the indicator even with one message in pinned message banner #12946

Merged
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions res/css/views/rooms/_PinnedMessageBanner.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
grid-area: title;
font: var(--cpd-font-body-sm-regular);
color: var(--cpd-color-text-action-accent);
height: 20px;
line-height: 20px;

.mx_PinnedMessageBanner_title_counter {
font: var(--cpd-font-body-sm-semibold);
Expand All @@ -90,7 +90,7 @@
.mx_PinnedMessageBanner_message {
grid-area: message;
font: var(--cpd-font-body-sm-regular);
height: 20px;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand All @@ -114,6 +114,10 @@
height: 63px;

.mx_PinnedMessageBanner_content {
grid-template: "pinIcon message" auto;
grid-template: "indicators pinIcon message" auto;

.mx_PinnedMessageBanner_message {
line-height: 40px;
}
}
}
2 changes: 1 addition & 1 deletion src/components/views/rooms/PinnedMessageBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function PinnedMessageBanner({ room, permalinkCreator }: PinnedMessageBan
onClick={onBannerClick}
>
<div className="mx_PinnedMessageBanner_content">
{!isSinglePinnedEvent && <Indicators count={eventCount} currentIndex={currentEventIndex} />}
<Indicators count={eventCount} currentIndex={currentEventIndex} />
<PinIcon width="20" className="mx_PinnedMessageBanner_PinIcon" />
{!isSinglePinnedEvent && (
<div className="mx_PinnedMessageBanner_title" data-testid="banner-counter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ exports[`<PinnedMessageBanner /> should render a single pinned event 1`] = `
<div
class="mx_PinnedMessageBanner_content"
>
<div
class="mx_PinnedMessageBanner_Indicators"
>
<div
class="mx_PinnedMessageBanner_Indicator mx_PinnedMessageBanner_Indicator--active"
data-testid="banner-indicator"
/>
</div>
<div
class="mx_PinnedMessageBanner_PinIcon"
width="20"
Expand Down
Loading