From 572c7d50d0bc0a8b0c015ba129022c4c3350a850 Mon Sep 17 00:00:00 2001 From: David Langley Date: Wed, 16 Apr 2025 15:31:30 +0100 Subject: [PATCH] Only apply larger minimised with on new room list --- res/css/structures/_LeftPanel.pcss | 4 ++++ src/components/structures/LeftPanel.tsx | 3 ++- src/components/structures/LoggedInView.tsx | 19 ++++++++++++++++--- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/res/css/structures/_LeftPanel.pcss b/res/css/structures/_LeftPanel.pcss index c042b12acd..f92035c504 100644 --- a/res/css/structures/_LeftPanel.pcss +++ b/res/css/structures/_LeftPanel.pcss @@ -25,6 +25,10 @@ Please see LICENSE files in the repository root for full details. .mx_LeftPanel_wrapper, .mx_LeftPanel { + --collapsedWidth: 68px; +} + +.mx_LeftPanel_NewRoomList { --collapsedWidth: 232px; } diff --git a/src/components/structures/LeftPanel.tsx b/src/components/structures/LeftPanel.tsx index 3686d52bca..bd64016c34 100644 --- a/src/components/structures/LeftPanel.tsx +++ b/src/components/structures/LeftPanel.tsx @@ -379,13 +379,14 @@ export default class LeftPanel extends React.Component { } public render(): React.ReactNode { + const useNewRoomList = SettingsStore.getValue("feature_new_room_list"); const containerClasses = classNames({ mx_LeftPanel: true, + mx_LeftPanel_NewRoomList: useNewRoomList, mx_LeftPanel_minimized: this.props.isMinimized, }); const roomListClasses = classNames("mx_LeftPanel_actualRoomListContainer", "mx_AutoHideScrollbar"); - const useNewRoomList = SettingsStore.getValue("feature_new_room_list"); if (useNewRoomList) { return (
diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx index d8d5349b19..36bb92603f 100644 --- a/src/components/structures/LoggedInView.tsx +++ b/src/components/structures/LoggedInView.tsx @@ -259,9 +259,15 @@ class LoggedInView extends React.Component { private createResizer(): Resizer { let panelSize: number | null; let panelCollapsed: boolean; + const useNewRoomList = SettingsStore.getValue("feature_new_room_list"); + let toggleSize = 206 - 50; + if (useNewRoomList) { + toggleSize = 232; + } + const collapseConfig: ICollapseConfig = { // TODO decrease this once Spaces launches as it'll no longer need to include the 56px Community Panel - toggleSize: 232, + toggleSize: toggleSize, onCollapsed: (collapsed) => { panelCollapsed = collapsed; if (collapsed) { @@ -697,6 +703,13 @@ class LoggedInView extends React.Component { "mx_MatrixChat--with-avatar": this.state.backgroundImage, }); + const useNewRoomList = SettingsStore.getValue("feature_new_room_list"); + + const leftPanelWrapperClasses = classNames({ + mx_LeftPanel_wrapper: true, + mx_LeftPanel_NewRoomList: useNewRoomList, + }); + const audioFeedArraysForCalls = this.state.activeCalls.map((call) => { return ; }); @@ -713,7 +726,7 @@ class LoggedInView extends React.Component {
-
+
@@ -724,7 +737,7 @@ class LoggedInView extends React.Component { >