From 33c900e3070ae57d0c5c255107f030508e82a02f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 30 Sep 2024 17:36:24 +0100 Subject: [PATCH] Remove right panel toggling behaviour on room header buttons (#100) * Remove right panel toggling behaviour on room header buttons Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove stale test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- playwright/e2e/read-receipts/index.ts | 3 +++ src/components/views/rooms/RoomHeader.tsx | 10 +++++----- .../rooms/RoomHeader/VideoRoomChatButton.tsx | 2 +- src/stores/right-panel/RightPanelStore.ts | 17 ----------------- .../RoomHeader/VideoRoomChatButton-test.tsx | 4 ++-- .../stores/right-panel/RightPanelStore-test.ts | 18 ------------------ 6 files changed, 11 insertions(+), 43 deletions(-) diff --git a/playwright/e2e/read-receipts/index.ts b/playwright/e2e/read-receipts/index.ts index 47bd5c2d5c..f097ec839d 100644 --- a/playwright/e2e/read-receipts/index.ts +++ b/playwright/e2e/read-receipts/index.ts @@ -395,6 +395,9 @@ class Helpers { */ async closeThreadsPanel() { await this.page.locator(".mx_RoomHeader").getByLabel("Threads").click(); + if (await this.page.locator("#thread-panel").isVisible()) { + await this.page.locator(".mx_RoomHeader").getByLabel("Threads").click(); + } await expect(this.page.locator(".mx_RightPanel")).not.toBeVisible(); } diff --git a/src/components/views/rooms/RoomHeader.tsx b/src/components/views/rooms/RoomHeader.tsx index 6e04a60601..b09d4c70e2 100644 --- a/src/components/views/rooms/RoomHeader.tsx +++ b/src/components/views/rooms/RoomHeader.tsx @@ -255,7 +255,7 @@ export default function RoomHeader({