Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
narrow_banner: Add banner for no resolved topics found search.
akshatdalton272901326cf9
diff --git a/frontend_tests/node_tests/narrow.js b/frontend_tests/node_tests/narrow.jsindex d16017d9e8b..530322c2ad6 100644--- a/frontend_tests/node_tests/narrow.js+++ b/frontend_tests/node_tests/narrow.js@@ -60,6 +60,7 @@ function hide_all_empty_narrow_messages() {"#empty_narrow_group_private_message","#silent_user","#empty_search_narrow_message",+ "#empty_narrow_resolved_topics",];for (const selector of all_empty_narrow_messages) {$(selector).hide();@@ -133,6 +134,11 @@ run_test("show_empty_narrow_message", () => {narrow_banner.show_empty_narrow_message();assert.ok($("#no_unread_narrow_message").visible());+ set_filter([["is", "resolved"]]);+ hide_all_empty_narrow_messages();+ narrow_banner.show_empty_narrow_message();+ assert.ok($("#empty_narrow_resolved_topics").visible());+set_filter([["pm-with", ["Yo"]]]);hide_all_empty_narrow_messages();narrow_banner.show_empty_narrow_message();diff --git a/static/js/narrow_banner.js b/static/js/narrow_banner.jsindex 40afcea6d7f..8ca8f89a1fa 100644--- a/static/js/narrow_banner.js+++ b/static/js/narrow_banner.js@@ -127,6 +127,8 @@ function pick_empty_narrow_banner() {case "unread":// You have no unread messages.return $("#no_unread_narrow_message");+ case "resolved":+ return $("#empty_narrow_resolved_topics");}// fallthrough to default case if no match is foundbreak;diff --git a/templates/zerver/app/message_feed_errors.html b/templates/zerver/app/message_feed_errors.htmlindex 20403cf8e23..9c2f076de5b 100644--- a/templates/zerver/app/message_feed_errors.html+++ b/templates/zerver/app/message_feed_errors.html@@ -126,3 +126,6 @@<h4>{{ _('No search results') }}</h4><p><span id="empty_search_stop_words_string" class="empty_search_text"></span></p></div>+<div id="empty_narrow_resolved_topics" class="empty_feed_notice">+ <h4>{{ _("No topics are marked as resolved.") }}</h4>+</div>