* Add message preview support to the new room list * Support showing message previews in the room list items * Add the secondary filters bar with the '...' menu, containing just the option for message previews for now * Change message preview toggle hook to update when setting is updated * Use new compund release * Unused i18n keys * Unused imports * Fix test & update snapshot * Fix more snapshots * Fix test Split into two tests that test setting & updating * Type import * Snapshots * Remove unnecessary Flex container and update screenshots as the room list has got shorter from the added bar * More snapshots & screenshots * More snapshots * Add test and remove active filter that's not done yet * Update snapshots & screenshots again * Other screenshot * Add more tests * Fix syntax * Fix tests * Use setter directly Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> * Fix CSS * Remopve filter button css for now * Update to remove forwardRef * Add comment on why lack of TypedEventEmitter * snapshots again * Screenshots again * Use original screenshots, maybe they'll work now * Add comment --------- Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
86 lines
2.4 KiB
Plaintext
86 lines
2.4 KiB
Plaintext
/*
|
|
* Copyright 2025 New Vector Ltd.
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
|
* Please see LICENSE files in the repository root for full details.
|
|
*/
|
|
|
|
/**
|
|
* The RoomListItemView has the following structure:
|
|
* button----------------------------------------|
|
|
* | <-12px-> container--------------------------|
|
|
* | | room avatar <-12px-> content-----|
|
|
* | | | room_name |
|
|
* | | | ----------| <-- border
|
|
* |---------------------------------------------|
|
|
*/
|
|
.mx_RoomListItemView {
|
|
all: unset;
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
background-color: var(--cpd-color-bg-action-secondary-hovered);
|
|
}
|
|
|
|
.mx_RoomListItemView_container {
|
|
padding-left: var(--cpd-space-2x);
|
|
font: var(--cpd-font-body-md-regular);
|
|
height: 100%;
|
|
|
|
.mx_RoomListItemView_content {
|
|
height: 100%;
|
|
flex: 1;
|
|
/* The border is only under the room name and the future hover menu */
|
|
border-bottom: var(--cpd-border-width-0-5) solid var(--cpd-color-bg-subtle-secondary);
|
|
box-sizing: border-box;
|
|
min-width: 0;
|
|
|
|
.mx_RoomListItemView_text {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.mx_RoomListItemView_roomName {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.mx_RoomListItemView_messagePreview {
|
|
font: var(--cpd-font-body-sm-regular);
|
|
color: var(--cpd-color-text-secondary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.mx_RoomListItemView_menu_open {
|
|
background-color: var(--cpd-color-bg-action-secondary-hovered);
|
|
|
|
.mx_RoomListItemView_content {
|
|
padding-right: var(--cpd-space-1-5x);
|
|
}
|
|
}
|
|
|
|
.mx_RoomListItemView_selected {
|
|
background-color: var(--cpd-color-bg-action-secondary-pressed);
|
|
}
|
|
|
|
.mx_RoomListItemView_notification_decoration {
|
|
.mx_RoomListItemView_content {
|
|
padding-right: var(--cpd-space-2x);
|
|
}
|
|
}
|
|
|
|
.mx_RoomListItemView_empty {
|
|
.mx_RoomListItemView_content {
|
|
padding-right: var(--cpd-space-3x);
|
|
}
|
|
}
|
|
|
|
.mx_RoomListItemView_bold .mx_RoomListItemView_roomName {
|
|
font: var(--cpd-font-body-md-semibold);
|
|
}
|