* feat(new room list): move `RoomListView` to its own folder and add styling * feat(new room list): add search section * test(new room list): add tests for `RoomListSearch` * test(new room list): add tests for `RoomListView` * test(e2e): add method to close notification toast to `ElementAppPage` * test(e2e): add tests for the search section * test(e2e): add tests for the room list view * refactor: use Flex component * fix: loop icon size in search button * refactor: remove `focus_room_filter` listener
34 lines
953 B
TypeScript
34 lines
953 B
TypeScript
/*
|
|
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.
|
|
*/
|
|
|
|
import React from "react";
|
|
|
|
import { shouldShowComponent } from "../../../../customisations/helpers/UIComponents";
|
|
import { UIComponent } from "../../../../settings/UIFeature";
|
|
import { RoomListSearch } from "./RoomListSearch";
|
|
|
|
type RoomListViewProps = {
|
|
/**
|
|
* Current active space
|
|
* See {@link RoomListSearch}
|
|
*/
|
|
activeSpace: string;
|
|
};
|
|
|
|
/**
|
|
* A view component for the room list.
|
|
*/
|
|
export const RoomListView: React.FC<RoomListViewProps> = ({ activeSpace }) => {
|
|
const displayRoomSearch = shouldShowComponent(UIComponent.FilterContainer);
|
|
|
|
return (
|
|
<div className="mx_RoomListView" data-testid="room-list-view">
|
|
{displayRoomSearch && <RoomListSearch activeSpace={activeSpace} />}
|
|
</div>
|
|
);
|
|
};
|