From c009d15176865924dd9175e834b3804744eaa4d6 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Thu, 7 Oct 2021 10:57:23 +0100 Subject: [PATCH 1/3] Allow the header container to collapse on itself when room list not minimised --- res/css/views/rooms/_RoomSublist.scss | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/res/css/views/rooms/_RoomSublist.scss b/res/css/views/rooms/_RoomSublist.scss index 6db2185dd5..5f92108e72 100644 --- a/res/css/views/rooms/_RoomSublist.scss +++ b/res/css/views/rooms/_RoomSublist.scss @@ -22,6 +22,12 @@ limitations under the License. display: none; } + &:not(.mx_RoomSublist_minimized) { + .mx_RoomSublist_headerContainer { + height: auto; + } + } + .mx_RoomSublist_headerContainer { // Create a flexbox to make alignment easy display: flex; @@ -41,9 +47,7 @@ limitations under the License. // The combined height must be set in the LeftPanel component for sticky headers // to work correctly. padding-bottom: 8px; - // Allow the container to collapse on itself if its children - // are not in the normal document flow - max-height: 24px; + height: 24px; color: $roomlist-header-color; .mx_RoomSublist_stickable { @@ -176,9 +180,9 @@ limitations under the License. // scroll jumps when they become sticky. However, that leaves a gap when // scrolled to the top above the first sublist (whose header can only ever // stick to top), so we make sure to exclude the first visible sublist. - &:not(.mx_RoomSublist_hidden) ~ .mx_RoomSublist .mx_RoomSublist_headerContainer { - height: 24px; - } + // &:not(.mx_RoomSublist_hidden) ~ .mx_RoomSublist .mx_RoomSublist_headerContainer { + // height: 24px; + // } .mx_RoomSublist_resizeBox { position: relative; From 57b919b10af21663aa56793281d13cad5544c701 Mon Sep 17 00:00:00 2001 From: Germain Date: Thu, 7 Oct 2021 16:51:39 +0100 Subject: [PATCH 2/3] Delete fixed headerContainer height Co-authored-by: Travis Ralston --- res/css/views/rooms/_RoomSublist.scss | 3 --- 1 file changed, 3 deletions(-) diff --git a/res/css/views/rooms/_RoomSublist.scss b/res/css/views/rooms/_RoomSublist.scss index 5f92108e72..494c8174d7 100644 --- a/res/css/views/rooms/_RoomSublist.scss +++ b/res/css/views/rooms/_RoomSublist.scss @@ -180,9 +180,6 @@ limitations under the License. // scroll jumps when they become sticky. However, that leaves a gap when // scrolled to the top above the first sublist (whose header can only ever // stick to top), so we make sure to exclude the first visible sublist. - // &:not(.mx_RoomSublist_hidden) ~ .mx_RoomSublist .mx_RoomSublist_headerContainer { - // height: 24px; - // } .mx_RoomSublist_resizeBox { position: relative; From 822f73edf7b5a5c8203e297cce95dd279e7a650e Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Thu, 7 Oct 2021 17:28:37 +0100 Subject: [PATCH 3/3] Remove stale comments in _RoomSublist.scss --- res/css/views/rooms/_RoomSublist.scss | 5 ----- 1 file changed, 5 deletions(-) diff --git a/res/css/views/rooms/_RoomSublist.scss b/res/css/views/rooms/_RoomSublist.scss index 494c8174d7..95b9f1822d 100644 --- a/res/css/views/rooms/_RoomSublist.scss +++ b/res/css/views/rooms/_RoomSublist.scss @@ -176,11 +176,6 @@ limitations under the License. } } - // In the general case, we reserve space for each sublist header to prevent - // scroll jumps when they become sticky. However, that leaves a gap when - // scrolled to the top above the first sublist (whose header can only ever - // stick to top), so we make sure to exclude the first visible sublist. - .mx_RoomSublist_resizeBox { position: relative;