Skip to content

Build your personal knowledge base with Trilium Notes

chore(sidebar): make grow sections individually scrollable

Elian Doranc920dfb4a078
diff --git a/apps/client/src/widgets/sidebar/RightPanelContainer.css b/apps/client/src/widgets/sidebar/RightPanelContainer.css
index 5a37287d83..8351868cb3 100644
--- a/apps/client/src/widgets/sidebar/RightPanelContainer.css
+++ b/apps/client/src/widgets/sidebar/RightPanelContainer.css
@@ -42,7 +42,27 @@ body.experimental-feature-new-layout #right-pane {
}
.card.grow:not(.collapsed) {
- flex-grow: 1;
+ flex: 1;
+ flex-shrink: 1;
+ min-height: 0;
+ display: flex;
+ flex-direction: column;
+
+ .body-wrapper {
+ flex: 1;
+ min-height: 0;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ }
+
+ .card-body {
+ flex: 1;
+ min-height: 0;
+ overflow: auto;
+ display: flex;
+ flex-direction: column;
+ }
}
.gutter-vertical + .card .card-header {
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.css b/apps/client/src/widgets/sidebar/SidebarChat.css
index fb616b5cf8..a05281ee41 100644
--- a/apps/client/src/widgets/sidebar/SidebarChat.css
+++ b/apps/client/src/widgets/sidebar/SidebarChat.css
@@ -50,30 +50,10 @@
max-width: 100%;
}
-/* Make the sidebar chat widget grow to fill available space when expanded */
-#right-pane #sidebar-chat.widget.grow:not(.collapsed) {
- flex: 1;
- flex-shrink: 1; /* Override flex-shrink: 0 from main styles */
- min-height: 0;
- display: flex;
- flex-direction: column;
-
- .body-wrapper {
- flex: 1;
- min-height: 0;
- display: flex;
- flex-direction: column;
- overflow: hidden; /* Override overflow: auto from main styles */
- }
-
- .card-body {
- flex: 1;
- min-height: 0;
- overflow: hidden; /* Override overflow: auto - let child handle scrolling */
- display: flex;
- flex-direction: column;
- padding: 0;
- }
+/* Remove default card-body padding and let child handle scrolling */
+#sidebar-chat .card-body {
+ padding: 0;
+ overflow: hidden;
}
/* Compact markdown in sidebar */