Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
left_sidebar: Visually separate DM section from channels.
Evy Kassirer24fde239b106
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.cssindex 49ce7e443b2..469a2fc5cf8 100644--- a/web/styles/app_variables.css+++ b/web/styles/app_variables.css@@ -315,6 +315,9 @@--sidebar-bottom-spacing: 25px;--sidebar-filter-bottom-spacing: 3px;+ /* 5px / 16px em */+ --left-sidebar-direct-messages-bottom-divider-padding: 0.3125em;+/* We base sidebar row heights on their line heights.Prominent rows include things like headers (e.g., VIEWS)as well as navigation items. Everything else takes@@ -835,6 +838,10 @@hsl(0deg 0% 80%),hsl(0deg 0% 0% / 60%));+ --color-left-sidebar-direct-messages-bottom-divider: light-dark(+ hsl(0deg 0% 0% / 15%),+ hsl(0deg 0% 100% / 15%)+ );--color-unread-marker: hsl(217deg 64% 59%);--color-masked-unread-marker: light-dark(hsl(0deg 0% 80%),diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.cssindex 2537c3b2fbc..84a2277d917 100644--- a/web/styles/left_sidebar.css+++ b/web/styles/left_sidebar.css@@ -228,6 +228,23 @@}}+.direct-message-section-bottom-divider-container {+ display: block;+ margin-right: var(--left-sidebar-right-margin);+ padding: var(--left-sidebar-direct-messages-bottom-divider-padding) 0;+ position: sticky;+ top: var(--line-height-sidebar-row-prominent);+ background: var(--color-background);+ z-index: 3;+}++.direct-message-section-bottom-divider {+ opacity: 1 !important; /* override .dark-theme:root hr */+ border-color: var(--color-left-sidebar-direct-messages-bottom-divider);+ border-width: 0.5px;+ margin: 0;+}+#hide-more-direct-messages,#direct-messages-section-header {grid-template-columns:@@ -400,7 +417,11 @@cursor: pointer;background-color: var(--color-background);position: sticky;- top: var(--line-height-sidebar-row-prominent);+ /* height of DM header + 1px divider line and its top/bottom padding */+ top: calc(+ var(--line-height-sidebar-row-prominent) + 1px + 2 *+ var(--left-sidebar-direct-messages-bottom-divider-padding)+ );/* Must be more than .sidebar-topic-check and less than #left-sidebar-searchand #direct-messages-section-header */z-index: 2;@@ -2352,6 +2373,10 @@ li.topic-list-item {display: none;}+ .direct-message-section-bottom-divider-container {+ display: none;+ }+.stream-list-subsection-header {top: 0;}diff --git a/web/templates/left_sidebar.hbs b/web/templates/left_sidebar.hbsindex fdf3d50a6c1..cf11896d417 100644--- a/web/templates/left_sidebar.hbs+++ b/web/templates/left_sidebar.hbs@@ -65,7 +65,9 @@<div class="direct-messages-container zoom-out hidden-for-spectators"><div id="direct-messages-list"></div></div>-+ <div class="direct-message-section-bottom-divider-container">+ <hr class="direct-message-section-bottom-divider"/>+ </div><div id="streams_list" class="zoom-out"><div id="topics_header"><a class="show-all-streams trigger-click-on-enter" tabindex="0">{{t 'Back to channels' }}</a> <span class="unread_count quiet-count"></span>