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>
This commit is contained in:
Šimon Brandner 2023-07-21 12:33:37 +02:00 committed by GitHub
parent 0b0d77cbcc
commit 3b0ed17241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 13 deletions

View File

@ -160,7 +160,7 @@ describe("Room Header", () => {
} }
// Assert that there is not a button except those buttons // 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"); cy.get(".mx_RoomHeader").percySnapshotElement("Room header - with a video room");

View File

@ -2433,23 +2433,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
// Simplify the header for other main split types // Simplify the header for other main split types
switch (this.state.mainSplitContentType) { switch (this.state.mainSplitContentType) {
case MainSplitContentType.MaximisedWidget: case MainSplitContentType.MaximisedWidget:
excludedRightPanelPhaseButtons = [RightPanelPhases.ThreadPanel, RightPanelPhases.PinnedMessages]; excludedRightPanelPhaseButtons = [];
onAppsClick = null; onAppsClick = null;
onForgetClick = null; onForgetClick = null;
onSearchClick = null; onSearchClick = null;
break; break;
case MainSplitContentType.Call: case MainSplitContentType.Call:
excludedRightPanelPhaseButtons = [ 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);
}
}
onAppsClick = null; onAppsClick = null;
onForgetClick = null; onForgetClick = null;
onSearchClick = null; onSearchClick = null;