Skip to content
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
8 changes: 8 additions & 0 deletions src/components/views/rooms/RoomListPanel/EmptyRoomList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ export function EmptyRoomList({ vm }: EmptyRoomListProps): JSX.Element | undefin
filter={vm.activePrimaryFilter}
/>
);
case FilterKey.LowPriorityFilter:
return (
<ActionPlaceholder
title={_t("room_list|empty|no_lowpriority")}
action={_t("room_list|empty|show_activity")}
filter={vm.activePrimaryFilter}
/>
);
default:
return undefined;
}
Expand Down
1 change: 1 addition & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,7 @@
"no_favourites": "You don't have favourite chat yet",
"no_favourites_description": "You can add a chat to your favourites in the chat settings",
"no_invites": "You don't have any unread invites",
"no_lowpriority": "You don't have any low priority rooms",
"no_mentions": "You don't have any unread mentions",
"no_people": "You don’t have direct chats with anyone yet",
"no_people_description": "You can deselect filters in order to see your other chats",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ describe("<EmptyRoomList />", () => {
{ key: FilterKey.UnreadFilter, name: "unread", action: "Show all chats" },
{ key: FilterKey.MentionsFilter, name: "mention", action: "See all activity" },
{ key: FilterKey.InvitesFilter, name: "invite", action: "See all activity" },
{ key: FilterKey.LowPriorityFilter, name: "low priority", action: "See all activity" },
])("should display the empty state for the $name filter", async ({ key, name, action }) => {
const user = userEvent.setup();
const activePrimaryFilter = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,31 @@ exports[`<EmptyRoomList /> should display the empty state for the invite filter
</DocumentFragment>
`;

exports[`<EmptyRoomList /> should display the empty state for the low priority filter 1`] = `
<DocumentFragment>
<div
class="mx_Flex mx_EmptyRoomList_GenericPlaceholder"
data-testid="empty-room-list"
style="--mx-flex-display: flex; --mx-flex-direction: column; --mx-flex-align: stretch; --mx-flex-justify: center; --mx-flex-gap: var(--cpd-space-2x); --mx-flex-wrap: nowrap;"
>
<span
class="mx_EmptyRoomList_GenericPlaceholder_title"
>
You don't have any low priority rooms
</span>
<button
class="_button_vczzf_8"
data-kind="tertiary"
data-size="lg"
role="button"
tabindex="0"
>
See all activity
</button>
</div>
</DocumentFragment>
`;

exports[`<EmptyRoomList /> should display the empty state for the mention filter 1`] = `
<DocumentFragment>
<div
Expand Down