Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stream_list: Add new class `stream-expanded` besides `active-filter`.
Lalitf36c9c255b9a
diff --git a/web/src/stream_list.js b/web/src/stream_list.jsindex 9d3f4b0389e..9185a25f27a 100644--- a/web/src/stream_list.js+++ b/web/src/stream_list.js@@ -596,7 +596,7 @@ export function get_sidebar_stream_topic_info(filter) {}function deselect_stream_items() {- $("ul#stream_filters li").removeClass("active-filter");+ $("ul#stream_filters li").removeClass("active-filter stream-expanded");}export function update_stream_sidebar_for_narrow(filter) {@@ -628,6 +628,11 @@ export function update_stream_sidebar_for_narrow(filter) {$stream_li.addClass("active-filter");}+ // Always add 'stream-expanded' class irrespective of whether+ // topic is selected or not. This is required for proper styling+ // masked unread counts.+ $stream_li.addClass("stream-expanded");+if (stream_id !== topic_list.active_stream_id()) {topic_zoom.clear_topics();}diff --git a/web/tests/stream_list.test.js b/web/tests/stream_list.test.jsindex 9029db18127..4423cda67cd 100644--- a/web/tests/stream_list.test.js+++ b/web/tests/stream_list.test.js@@ -459,7 +459,7 @@ test_ui("narrowing", ({mock_template}) => {};stream_list.handle_narrow_deactivated();- assert.equal(removed_classes, "active-filter");+ assert.equal(removed_classes, "active-filter stream-expanded");assert.ok(topics_closed);});