Add options to hide right panel in room view (#31252)

* feat: add options to hide right panel in room view

This option is added for the module API.

* test: add test for hideRightPanel=true of room view

* test: update snapshot ids
This commit is contained in:
Florian Duros
2025-11-18 11:05:53 +01:00
committed by GitHub
parent b7acbe65c1
commit 0eff1caab2
3 changed files with 424 additions and 31 deletions

View File

@@ -175,6 +175,11 @@ interface IRoomProps extends RoomViewProps {
* If true, hide the composer
*/
hideComposer?: boolean;
/*
* If true, hide the right panel
*/
hideRightPanel?: boolean;
}
export { MainSplitContentType };
@@ -2557,7 +2562,8 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
);
}
const showRightPanel = !isRoomEncryptionLoading && this.state.room && this.state.showRightPanel;
const showRightPanel =
!this.props.hideRightPanel && !isRoomEncryptionLoading && this.state.room && this.state.showRightPanel;
const rightPanel = showRightPanel ? (
<RightPanel