Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
typeahead: Show stream privacy icons in typeahead options.
Sahil Batra2700ad7903c2
diff --git a/web/src/typeahead_helper.js b/web/src/typeahead_helper.jsindex 080949afb05..9325b7d3d2a 100644--- a/web/src/typeahead_helper.js+++ b/web/src/typeahead_helper.js@@ -123,8 +123,8 @@ export function render_stream(stream) {}return render_typeahead_item({- primary: stream.name,secondary: desc,+ stream,is_unsubscribed: !stream.subscribed,});}diff --git a/web/templates/typeahead_list_item.hbs b/web/templates/typeahead_list_item.hbsindex 3b6b8321941..49fb2f21c22 100644--- a/web/templates/typeahead_list_item.hbs+++ b/web/templates/typeahead_list_item.hbs@@ -18,7 +18,11 @@<i class="typeahead-image icon fa fa-group no-presence-circle" aria-hidden="true"></i>{{/if}}<strong>- {{~ primary ~}}+ {{~#if stream}}+ {{> inline_decorated_stream_name stream=stream }}+ {{else}}+ {{~ primary ~}}+ {{/if}}</strong>{{~#if has_status}}{{> status_emoji status_emoji_info}}diff --git a/web/tests/typeahead_helper.test.js b/web/tests/typeahead_helper.test.jsindex 700d4c17685..fa4d02aeb71 100644--- a/web/tests/typeahead_helper.test.js+++ b/web/tests/typeahead_helper.test.js@@ -722,7 +722,7 @@ test("render_stream", ({mock_template}) => {};mock_template("typeahead_list_item.hbs", false, (args) => {- assert.equal(args.primary, stream.name);+ assert.equal(args.stream, stream);assert.equal(args.secondary, stream.description);rendered = true;return "typeahead-item-stub";@@ -741,7 +741,7 @@ test("render_stream w/long description", ({mock_template}) => {};mock_template("typeahead_list_item.hbs", false, (args) => {- assert.equal(args.primary, stream.name);+ assert.equal(args.stream, stream);const short_desc = stream.description.slice(0, 35);assert.equal(args.secondary, short_desc + "...");rendered = true;