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

Commit

Permalink
Revert "Fix: Right panel keeps showing chat when unmaximizing widget. (
Browse files Browse the repository at this point in the history
…#11697)" (#11786)

This reverts commit c44c772.
  • Loading branch information
Kerry committed Oct 24, 2023
1 parent 42db15f commit 9eb4410
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
16 changes: 0 additions & 16 deletions cypress/e2e/widgets/layout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
});
3 changes: 0 additions & 3 deletions src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
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);
};
Expand Down

0 comments on commit 9eb4410

Please sign in to comment.