From 9eb44105cb76fa1c687c73c42400031a7c72d549 Mon Sep 17 00:00:00 2001 From: Kerry Date: Tue, 24 Oct 2023 19:49:45 +1300 Subject: [PATCH] Revert "Fix: Right panel keeps showing chat when unmaximizing widget. (#11697)" (#11786) This reverts commit c44c772246bdac0009231a4d66694dfa4b802568. --- cypress/e2e/widgets/layout.spec.ts | 16 ---------------- src/components/structures/RoomView.tsx | 3 --- 2 files changed, 19 deletions(-) diff --git a/cypress/e2e/widgets/layout.spec.ts b/cypress/e2e/widgets/layout.spec.ts index fd6f50c1e0..16470fd5a0 100644 --- a/cypress/e2e/widgets/layout.spec.ts +++ b/cypress/e2e/widgets/layout.spec.ts @@ -129,20 +129,4 @@ describe("Widget Layout", () => { cy.get('iframe[title="widget"]').invoke("height").should("be.greaterThan", 400); }); - it("open right panel with chat when maximizing widget", () => { - cy.get('iframe[title="widget"]').invoke("height").should("be.lessThan", 250); - cy.findByRole("button", { name: "Maximise" }).click(); - cy.get(".mx_RightPanel").within(() => { - cy.get(".mx_BaseCard_header").should("contain", "Chat"); - }); - }); - it("close right panel with chat when unmaximizing widget", () => { - cy.get('iframe[title="widget"]').invoke("height").should("be.lessThan", 250); - cy.findByRole("button", { name: "Maximise" }).click(); - cy.get(".mx_RightPanel").within(() => { - cy.get(".mx_BaseCard_header").should("contain", "Chat"); - }); - cy.findByRole("button", { name: "Un-maximise" }).click(); - cy.get(".mx_RightPanel").should("not.exist"); - }); }); diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 408c5e40a5..8ca3cd4276 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -539,9 +539,6 @@ export class RoomView extends React.Component { if (this.context.widgetLayoutStore.hasMaximisedWidget(this.state.room)) { // Show chat in right panel when a widget is maximised this.context.rightPanelStore.setCard({ phase: RightPanelPhases.Timeline }); - } else { - // Close the chat in right panel when the widget is unmaximised - this.context.rightPanelStore.togglePanel(null); } this.checkWidgets(this.state.room); };