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

Commit

Permalink
Don't hide room header buttons in video rooms and rooms with a call (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
SimonBrandner and t3chguy authored Jul 21, 2023
1 parent 0b0d77c commit 3b0ed17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
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

0 comments on commit 3b0ed17

Please sign in to comment.