Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 3b0ed17

Browse files
Don't hide room header buttons in video rooms and rooms with a call (#9712)
* Don't hide room header buttons in video rooms and rooms with a call Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix types Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Attempt to fix types 2 Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Delint Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Update test case --------- Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 0b0d77c commit 3b0ed17

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

cypress/e2e/room/room-header.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe("Room Header", () => {
160160
}
161161

162162
// Assert that there is not a button except those buttons
163-
cy.findAllByRole("button").should("have.length", 5);
163+
cy.findAllByRole("button").should("have.length", 7);
164164
});
165165

166166
cy.get(".mx_RoomHeader").percySnapshotElement("Room header - with a video room");

src/components/structures/RoomView.tsx

+2-12
Original file line numberDiff line numberDiff line change
@@ -2433,23 +2433,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
24332433
// Simplify the header for other main split types
24342434
switch (this.state.mainSplitContentType) {
24352435
case MainSplitContentType.MaximisedWidget:
2436-
excludedRightPanelPhaseButtons = [RightPanelPhases.ThreadPanel, RightPanelPhases.PinnedMessages];
2436+
excludedRightPanelPhaseButtons = [];
24372437
onAppsClick = null;
24382438
onForgetClick = null;
24392439
onSearchClick = null;
24402440
break;
24412441
case MainSplitContentType.Call:
2442-
excludedRightPanelPhaseButtons = [
2443-
RightPanelPhases.ThreadPanel,
2444-
RightPanelPhases.PinnedMessages,
2445-
RightPanelPhases.NotificationPanel,
2446-
];
2447-
if (!isVideoRoom(this.state.room)) {
2448-
excludedRightPanelPhaseButtons.push(RightPanelPhases.RoomSummary);
2449-
if (this.state.activeCall === null) {
2450-
excludedRightPanelPhaseButtons.push(RightPanelPhases.Timeline);
2451-
}
2452-
}
2442+
excludedRightPanelPhaseButtons = [];
24532443
onAppsClick = null;
24542444
onForgetClick = null;
24552445
onSearchClick = null;

0 commit comments

Comments
 (0)