Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

left_sidebar: Render brackets only on non-empty channels.

Karl Stolley776a90d9ba15
diff --git a/web/src/topic_list.ts b/web/src/topic_list.ts
index af9ad053e51..aa309920fb8 100644
--- a/web/src/topic_list.ts
+++ b/web/src/topic_list.ts
@@ -166,7 +166,13 @@ export class TopicListWidget {
list_info.items.length === num_possible_topics &&
stream_topic_history.is_complete_for_stream_id(this.my_stream_id);
- const attrs: [string, string][] = [["class", "topic-list"]];
+ const topic_list_classes: [string] = ["topic-list"];
+
+ if (list_info.items.length > 0) {
+ topic_list_classes.push("topic-list-has-topics");
+ }
+
+ const attrs: [string, string][] = [["class", topic_list_classes.join(" ")]];
const nodes = list_info.items.map((conversation) => keyed_topic_li(conversation));
diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css
index 951a0a529b9..6a1f1b30c48 100644
--- a/web/styles/left_sidebar.css
+++ b/web/styles/left_sidebar.css
@@ -1160,7 +1160,7 @@ ul.topic-list {
font-weight: normal;
}
-ul.topic-list::before {
+ul.topic-list.topic-list-has-topics::before {
content: " ";
display: block;
position: absolute;
@@ -1175,7 +1175,7 @@ ul.topic-list::before {
pointer-events: none;
}
-ul.topic-list::after {
+ul.topic-list.topic-list-has-topics::after {
content: " ";
display: block;
position: absolute;