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

Don't hide room header buttons in video rooms and rooms with a call #9712

Merged
merged 8 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/e2e/room/room-header.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
14 changes: 2 additions & 12 deletions src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2433,23 +2433,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
// 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;
Expand Down