Show EmptyRoomListView when low priority filter matches zero rooms (#30122)

* Implement empty section for low prio filter

* Write test
This commit is contained in:
R Midhun Suresh
2025-06-11 17:06:29 +05:30
committed by GitHub
parent ed9b480338
commit 451a99d49e
4 changed files with 35 additions and 0 deletions

View File

@@ -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 = {

View File

@@ -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