mirror of https://github.com/zulip/zulip.git
typeahead: Show stream privacy icons in typeahead options.
We now show the stream privacy icons along with their names in the typeahead options.
This commit is contained in:
parent
0676629008
commit
2700ad7903
|
@ -123,8 +123,8 @@ export function render_stream(stream) {
|
|||
}
|
||||
|
||||
return render_typeahead_item({
|
||||
primary: stream.name,
|
||||
secondary: desc,
|
||||
stream,
|
||||
is_unsubscribed: !stream.subscribed,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue