Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
left_sidebar: Present uniform, gridded filter boxes.
Karl Stolleyd14c3b7aac04
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.cssindex 6ebaa66ed53..22929c17cd9 100644--- a/web/styles/left_sidebar.css+++ b/web/styles/left_sidebar.css@@ -82,7 +82,7 @@font-weight: normal;.topic_search_section {- margin: 3px 0;+ margin: 3px 0 3px var(--left-sidebar-toggle-width-offset);}& li {@@ -962,7 +962,7 @@ li.top_left_scheduled_messages {definitions have the final say about dimensions and placement. */grid-template-areas:"starting-offset starting-anchor-element icon-content-gap row-content controls markers-and-unreads ending-anchor-element ending-offset"- ". . filter-box filter-box filter-box filter-box filter-box . ";+ ". filter-box filter-box filter-box filter-box filter-box filter-box . ";}#views-label-container {@@ -1113,6 +1113,20 @@ li.top_left_scheduled_messages {}}+.left-sidebar-filter-row {+ display: grid;+ grid-template-columns:+ [filter-box-start] minmax(0, 1fr)+ [clear-button-start] var(--line-height-sidebar-row-prominent)+ [clear-button-end filter-box-end];+ grid-template-rows: [filter-box-start clear-button-start] auto [clear-button-end filter-box-end];+ align-content: center;++ .clear_search_button {+ grid-area: clear-button;+ }+}+.topic-box,.searching-for-more-topics {display: grid;@@ -1133,12 +1147,6 @@ li.top_left_scheduled_messages {height: var(--line-height-sidebar-row-prominent);}-.topic_search_section {- padding: 8px 10px;- display: grid;- grid-template: "search-input clear-search" auto / minmax(0, 1fr) 30px;-}-.topic-box .zero_count {display: none;}@@ -1206,14 +1214,18 @@ li.top_left_scheduled_messages {}}+.direct-messages-list-filter {+ grid-area: filter-box;+ padding-right: var(--line-height-sidebar-row-prominent);+}+.topic-list-filter {+ grid-area: filter-box;+ padding-right: var(--line-height-sidebar-row-prominent);box-shadow: none;- padding-right: 28px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;- grid-column: search-input-start / clear-search-end;- grid-row: search-input;}#filter-topic-input:placeholder-shown + #clear_search_topic_button {@@ -1607,10 +1619,11 @@ li.topic-list-item {background-color: var(--color-background);&.showing-stream-search-section {- /* Open up the stream-search rows. The 10px+ /* Open up the stream-search rows. The 3px gap + 7pxrow maintains space with the streams listbelow. */- grid-template-rows: var(--line-height-sidebar-row-prominent) 28px 10px;+ grid-template-rows: var(--line-height-sidebar-row-prominent) auto 7px;+ row-gap: 3px;/* When the search section is showing, switchoff the hover effects on the row. */@@ -1690,14 +1703,14 @@ li.topic-list-item {.stream_search_section {grid-area: filter-box;- display: flex;- justify-content: stretch;- /* Set an even line-height for better- vertical centering. */- line-height: 20px;white-space: nowrap;}+ .stream-list-filter {+ grid-area: filter-box;+ padding-right: var(--line-height-sidebar-row-prominent);+ }+&.hide_unread_counts {.unread_count,.unread_count.hide,@@ -1730,29 +1743,6 @@ li.topic-list-item {.stream_search_section,.direct-messages-search-section {- .stream-list-filter,- .direct-messages-list-filter {- box-sizing: border-box;- width: 100%;- /* Match the input height exactly- with the row height for a perfect- fit and better vertical alignment. */- height: 28px;- /* Pad the entire clear-button area,- so that input text does not bleed- into there. */- padding-right: 30px;- }-- .clear_search_button {- box-sizing: border-box;- position: static;- display: grid;- place-items: center;- width: 30px;- margin-left: -30px;- }-.direct-messages-list-filter:placeholder-shown+ #clear-direct-messages-search-button {display: none;@@ -1826,6 +1816,7 @@ li.topic-list-item {}}+.direct-messages-list-filter,.stream-list-filter {white-space: nowrap;text-overflow: ellipsis;@@ -1894,10 +1885,8 @@ li.topic-list-item {}.direct-messages-search-section {- display: flex;- grid-column: row-content / markers-and-unreads;- margin-top: 5px;- margin-bottom: 5px;+ grid-column: filter-box;+ margin: 5px 0 5px var(--left-sidebar-toggle-width-offset);}.zoom-in-hide {diff --git a/web/templates/filter_topics.hbs b/web/templates/filter_topics.hbsindex 96a5ac957b0..7e3b0340ab7 100644--- a/web/templates/filter_topics.hbs+++ b/web/templates/filter_topics.hbs@@ -1,4 +1,4 @@-<div class="topic_search_section filter-topics">+<div class="topic_search_section filter-topics left-sidebar-filter-row"><input class="topic-list-filter home-page-input filter_text_input" id="filter-topic-input" type="text" autocomplete="off" placeholder="{{t 'Filter topics'}}" /><button type="button" class="clear_search_button" id="clear_search_topic_button"><i class="zulip-icon zulip-icon-close" aria-hidden="true"></i>diff --git a/web/templates/left_sidebar.hbs b/web/templates/left_sidebar.hbsindex c0b2f7738a9..f1f22c721cb 100644--- a/web/templates/left_sidebar.hbs+++ b/web/templates/left_sidebar.hbs@@ -163,7 +163,7 @@<a class="zoom-out-hide" id="hide-more-direct-messages"><span class="hide-more-direct-messages-text"> {{t 'back to channels' }}</span></a>- <div class="zoom-out-hide direct-messages-search-section">+ <div class="zoom-out-hide direct-messages-search-section left-sidebar-filter-row"><input class="direct-messages-list-filter filter_text_input home-page-input" type="text" autocomplete="off" placeholder="{{t 'Filter direct messages' }}" /><button type="button" class="clear_search_button" id="clear-direct-messages-search-button"><i class="zulip-icon zulip-icon-close" aria-hidden="true"></i>@@ -192,7 +192,7 @@</span></div>- <div class="notdisplayed stream_search_section">+ <div class="notdisplayed stream_search_section left-sidebar-filter-row"><input class="stream-list-filter home-page-input filter_text_input" type="text" autocomplete="off" placeholder="{{t 'Filter channels' }}" /><button type="button" class="clear_search_button" id="clear_search_stream_button"><i class="zulip-icon zulip-icon-close" aria-hidden="true"></i>