From 3b0ed172413ad2ba76b8863baa350f592437a599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 21 Jul 2023 12:33:37 +0200 Subject: [PATCH] Don't hide room header buttons in video rooms and rooms with a call (#9712) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Don't hide room header buttons in video rooms and rooms with a call Signed-off-by: Šimon Brandner * Fix types Signed-off-by: Šimon Brandner * Attempt to fix types 2 Signed-off-by: Šimon Brandner * Delint Signed-off-by: Šimon Brandner * Update test case --------- Signed-off-by: Šimon Brandner Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- cypress/e2e/room/room-header.spec.ts | 2 +- src/components/structures/RoomView.tsx | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/cypress/e2e/room/room-header.spec.ts b/cypress/e2e/room/room-header.spec.ts index e537c1471d..1ad0d6bb96 100644 --- a/cypress/e2e/room/room-header.spec.ts +++ b/cypress/e2e/room/room-header.spec.ts @@ -160,7 +160,7 @@ describe("Room Header", () => { } // Assert that there is not a button except those buttons - cy.findAllByRole("button").should("have.length", 5); + cy.findAllByRole("button").should("have.length", 7); }); cy.get(".mx_RoomHeader").percySnapshotElement("Room header - with a video room"); diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 2e81dff67a..2a67a5445c 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -2433,23 +2433,13 @@ export class RoomView extends React.Component { // Simplify the header for other main split types switch (this.state.mainSplitContentType) { case MainSplitContentType.MaximisedWidget: - excludedRightPanelPhaseButtons = [RightPanelPhases.ThreadPanel, RightPanelPhases.PinnedMessages]; + excludedRightPanelPhaseButtons = []; onAppsClick = null; onForgetClick = null; onSearchClick = null; break; case MainSplitContentType.Call: - excludedRightPanelPhaseButtons = [ - RightPanelPhases.ThreadPanel, - RightPanelPhases.PinnedMessages, - RightPanelPhases.NotificationPanel, - ]; - if (!isVideoRoom(this.state.room)) { - excludedRightPanelPhaseButtons.push(RightPanelPhases.RoomSummary); - if (this.state.activeCall === null) { - excludedRightPanelPhaseButtons.push(RightPanelPhases.Timeline); - } - } + excludedRightPanelPhaseButtons = []; onAppsClick = null; onForgetClick = null; onSearchClick = null;