mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
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:
parent
0b0d77cbcc
commit
3b0ed17241
@ -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");
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user