Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
decorated_channels: Rename partial as 'decorated_channel'.
Karl Stolley1c55004cda42
diff --git a/web/src/compose_recipient.ts b/web/src/compose_recipient.tsindex 6ed3ef2b51b..464565c7d33 100644--- a/web/src/compose_recipient.ts+++ b/web/src/compose_recipient.ts@@ -5,7 +5,7 @@ import _ from "lodash";import assert from "minimalistic-assert";import type * as tippy from "tippy.js";-import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";+import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";import * as compose_banner from "./compose_banner.ts";import * as compose_fade from "./compose_fade.ts";@@ -167,7 +167,7 @@ function update_recipient_label(stream_id?: number): void {);} else {$("#compose_select_recipient_widget .dropdown_widget_value").html(- render_inline_decorated_stream_name({stream, show_colored_icon: true}),+ render_inline_decorated_channel_name({stream, show_colored_icon: true}),);}}diff --git a/web/src/dropdown_widget.ts b/web/src/dropdown_widget.tsindex b2f23ddf718..71059f9d541 100644--- a/web/src/dropdown_widget.ts+++ b/web/src/dropdown_widget.ts@@ -6,7 +6,7 @@ import render_dropdown_current_value_not_in_options from "../templates/dropdown_import render_dropdown_disabled_state from "../templates/dropdown_disabled_state.hbs";import render_dropdown_list from "../templates/dropdown_list.hbs";import render_dropdown_list_container from "../templates/dropdown_list_container.hbs";-import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";+import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";import * as blueslip from "./blueslip.ts";import * as ListWidget from "./list_widget.ts";@@ -591,7 +591,7 @@ export class DropdownWidget {$(this.widget_value_selector).html(render_dropdown_disabled_state({name: option.name}));} else if (option.stream) {$(this.widget_value_selector).html(- render_inline_decorated_stream_name({+ render_inline_decorated_channel_name({stream: option.stream,show_colored_icon: true,}),diff --git a/web/src/stream_edit.ts b/web/src/stream_edit.tsindex a37185037cf..7614b0c0424 100644--- a/web/src/stream_edit.ts+++ b/web/src/stream_edit.ts@@ -5,7 +5,7 @@ import type * as tippy from "tippy.js";import {z} from "zod";import render_settings_deactivation_stream_modal from "../templates/confirm_dialog/confirm_deactivate_stream.hbs";-import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";+import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";import render_change_stream_info_modal from "../templates/stream_settings/change_stream_info_modal.hbs";import render_confirm_stream_privacy_change_modal from "../templates/stream_settings/confirm_stream_privacy_change_modal.hbs";import render_copy_email_address_modal from "../templates/stream_settings/copy_email_address_modal.hbs";@@ -712,7 +712,7 @@ export function initialize(): void {const stream_id = get_stream_id(this);const stream = sub_store.get(stream_id);- const stream_name_with_privacy_symbol_html = render_inline_decorated_stream_name({stream});+ const stream_name_with_privacy_symbol_html = render_inline_decorated_channel_name({stream});const is_new_stream_announcements_stream =stream_id === realm.realm_new_stream_announcements_stream_id;diff --git a/web/src/stream_edit_subscribers.ts b/web/src/stream_edit_subscribers.tsindex 4b6e633a51c..5c22b6893f9 100644--- a/web/src/stream_edit_subscribers.ts+++ b/web/src/stream_edit_subscribers.ts@@ -3,7 +3,7 @@ import assert from "minimalistic-assert";import {z} from "zod";import render_unsubscribe_private_stream_modal from "../templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs";-import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";+import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";import render_stream_member_list_entry from "../templates/stream_settings/stream_member_list_entry.hbs";import render_stream_members_table from "../templates/stream_settings/stream_members_table.hbs";import render_stream_subscription_request_result from "../templates/stream_settings/stream_subscription_request_result.hbs";@@ -357,7 +357,7 @@ function remove_subscriber({return;}- const stream_name_with_privacy_symbol_html = render_inline_decorated_stream_name({+ const stream_name_with_privacy_symbol_html = render_inline_decorated_channel_name({stream: sub,});diff --git a/web/src/stream_events.ts b/web/src/stream_events.tsindex 97c7a4c3a56..cbd28dc1595 100644--- a/web/src/stream_events.ts+++ b/web/src/stream_events.ts@@ -1,7 +1,7 @@import $ from "jquery";import assert from "minimalistic-assert";-import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";+import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";import render_first_stream_created_modal from "../templates/stream_settings/first_stream_created_modal.hbs";import * as activity_ui from "./activity_ui.ts";@@ -222,7 +222,7 @@ function show_first_stream_created_modal(stream: StreamSubscription): void {html_heading: $t_html({defaultMessage: "Channel <b><z-stream></z-stream></b> created!"},{- "z-stream": () => render_inline_decorated_stream_name({stream}),+ "z-stream": () => render_inline_decorated_channel_name({stream}),},),html_body: render_first_stream_created_modal({stream}),diff --git a/web/src/stream_popover.ts b/web/src/stream_popover.tsindex be9e067d75d..6251e20a2f4 100644--- a/web/src/stream_popover.ts+++ b/web/src/stream_popover.ts@@ -3,7 +3,7 @@ import assert from "minimalistic-assert";import type * as tippy from "tippy.js";import {z} from "zod";-import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";+import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";import render_inline_stream_or_topic_reference from "../templates/inline_stream_or_topic_reference.hbs";import render_topic_already_exists_warning_banner from "../templates/modal_banner/topic_already_exists_warning_banner.hbs";import render_move_topic_to_stream from "../templates/move_topic_to_stream.hbs";@@ -672,7 +672,7 @@ export async function build_move_topic_to_stream_popover();} else {$("#move_topic_to_stream_widget .dropdown_widget_value").html(- render_inline_decorated_stream_name({stream, show_colored_icon: true}),+ render_inline_decorated_channel_name({stream, show_colored_icon: true}),);}}diff --git a/web/src/stream_settings_components.ts b/web/src/stream_settings_components.tsindex 78c96a46d1f..6a9d1508580 100644--- a/web/src/stream_settings_components.ts+++ b/web/src/stream_settings_components.ts@@ -2,7 +2,7 @@ import $ from "jquery";import {z} from "zod";import render_unsubscribe_private_stream_modal from "../templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs";-import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";+import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";import render_selected_stream_title from "../templates/stream_settings/selected_stream_title.hbs";import * as channel from "./channel.ts";@@ -225,7 +225,9 @@ function ajaxUnsubscribe(sub: StreamSubscription, $stream_row: JQuery | undefineexport function unsubscribe_from_private_stream(sub: StreamSubscription): void {const invite_only = sub.invite_only;const sub_count = peer_data.get_subscriber_count(sub.stream_id);- const stream_name_with_privacy_symbol_html = render_inline_decorated_stream_name({stream: sub});+ const stream_name_with_privacy_symbol_html = render_inline_decorated_channel_name({+ stream: sub,+ });const html_body = render_unsubscribe_private_stream_modal({unsubscribing_other_user: false,diff --git a/web/src/unread_ops.ts b/web/src/unread_ops.tsindex 00b8d8d3d54..c018bdd3b45 100644--- a/web/src/unread_ops.ts+++ b/web/src/unread_ops.ts@@ -5,7 +5,7 @@ import {z} from "zod";import render_confirm_mark_all_as_read from "../templates/confirm_dialog/confirm_mark_all_as_read.hbs";import render_confirm_mark_as_unread_from_here from "../templates/confirm_dialog/confirm_mark_as_unread_from_here.hbs";-import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";+import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";import render_skipped_marking_unread from "../templates/skipped_marking_unread.hbs";import * as blueslip from "./blueslip.ts";@@ -102,8 +102,8 @@ function handle_skipped_unsubscribed_streams(const stream_names_with_privacy_symbol_html = ignored_because_not_subscribed_channels.map((stream_id) => {const stream = sub_store.get(stream_id);- const decorated_stream_name = render_inline_decorated_stream_name({stream});- return `<span class="white-space-nowrap">${decorated_stream_name}</span>`;+ const decorated_channel_name = render_inline_decorated_channel_name({stream});+ return `<span class="white-space-nowrap">${decorated_channel_name}</span>`;},);diff --git a/web/templates/dropdown_list.hbs b/web/templates/dropdown_list.hbsindex ada974ef843..4a6e8092423 100644--- a/web/templates/dropdown_list.hbs+++ b/web/templates/dropdown_list.hbs@@ -22,7 +22,7 @@{{else}}<a class="dropdown-list-item-common-styles">{{#if stream}}- {{> inline_decorated_stream_name stream=stream show_colored_icon=true}}+ {{> inline_decorated_channel_name stream=stream show_colored_icon=true}}{{else if is_direct_message}}<i class="zulip-icon zulip-icon-users stream-privacy-type-icon"></i> {{name}}{{else if is_setting_disabled}}diff --git a/web/templates/inline_decorated_stream_name.hbs b/web/templates/inline_decorated_channel_name.hbssimilarity index 100%rename from web/templates/inline_decorated_stream_name.hbsrename to web/templates/inline_decorated_channel_name.hbsdiff --git a/web/templates/inline_stream_or_topic_reference.hbs b/web/templates/inline_stream_or_topic_reference.hbsindex 09c6081ec4d..6afcce2b9c3 100644--- a/web/templates/inline_stream_or_topic_reference.hbs+++ b/web/templates/inline_stream_or_topic_reference.hbs@@ -1,6 +1,6 @@<span class="stream-or-topic-reference">{{~#if stream~}}- {{> inline_decorated_stream_name stream=stream show_colored_icon=show_colored_icon}}+ {{> inline_decorated_channel_name stream=stream show_colored_icon=show_colored_icon}}{{#if topic_display_name~}} > {{/if}}{{~/if~}}<span {{#if is_empty_string_topic}}class="empty-topic-display"{{/if}}>{{~ topic_display_name ~}}</span>diff --git a/web/templates/stream_settings/announce_stream_checkbox.hbs b/web/templates/stream_settings/announce_stream_checkbox.hbsindex 313d565ad77..9b3ee3a1708 100644--- a/web/templates/stream_settings/announce_stream_checkbox.hbs+++ b/web/templates/stream_settings/announce_stream_checkbox.hbs@@ -4,7 +4,7 @@{{t "Announce new channel in"}}{{#if new_stream_announcements_stream_sub}}<strong>- {{> ../inline_decorated_stream_name+ {{> ../inline_decorated_channel_namestream=new_stream_announcements_stream_sub}}</strong>diff --git a/web/templates/stream_settings/browse_streams_list_item.hbs b/web/templates/stream_settings/browse_streams_list_item.hbsindex d631976f0a1..2bf543bd5e5 100644--- a/web/templates/stream_settings/browse_streams_list_item.hbs+++ b/web/templates/stream_settings/browse_streams_list_item.hbs@@ -8,7 +8,7 @@<span>{{#tr}}Unsubscribe from <z-stream></z-stream>- {{#*inline "z-stream"}}{{> ../inline_decorated_stream_name stream=this}}{{/inline}}+ {{#*inline "z-stream"}}{{> ../inline_decorated_channel_name stream=this}}{{/inline}}{{/tr}}</span></template>@@ -26,7 +26,7 @@<span>{{#tr}}Subscribe to <z-stream></z-stream>- {{#*inline "z-stream"}}{{> ../inline_decorated_stream_name stream=this}}{{/inline}}+ {{#*inline "z-stream"}}{{> ../inline_decorated_channel_name stream=this}}{{/inline}}{{/tr}}</span></template>@@ -35,7 +35,7 @@<span>{{#tr}}Cannot subscribe to <z-stream></z-stream>- {{#*inline "z-stream"}}{{> ../inline_decorated_stream_name stream=this}}{{/inline}}+ {{#*inline "z-stream"}}{{> ../inline_decorated_channel_name stream=this}}{{/inline}}{{/tr}}</span></template>diff --git a/web/templates/stream_settings/first_stream_created_modal.hbs b/web/templates/stream_settings/first_stream_created_modal.hbsindex c133fefd790..7add2cb4836 100644--- a/web/templates/stream_settings/first_stream_created_modal.hbs+++ b/web/templates/stream_settings/first_stream_created_modal.hbs@@ -3,7 +3,7 @@<li>{{#tr}}Click on <z-stream></z-stream> at the top of your Zulip window.- {{#*inline "z-stream"}}<b>{{> ../inline_decorated_stream_name stream=stream}}</b>{{/inline}}+ {{#*inline "z-stream"}}<b>{{> ../inline_decorated_channel_name stream=stream}}</b>{{/inline}}{{/tr}}</li><li>diff --git a/web/templates/stream_settings/stream_settings.hbs b/web/templates/stream_settings/stream_settings.hbsindex 43990fc3478..59e16e38580 100644--- a/web/templates/stream_settings/stream_settings.hbs+++ b/web/templates/stream_settings/stream_settings.hbs@@ -7,7 +7,7 @@<span>{{#tr}}Cannot subscribe to private channel <z-stream></z-stream>- {{#*inline "z-stream"}}{{> ../inline_decorated_stream_name stream=../sub}}{{/inline}}+ {{#*inline "z-stream"}}{{> ../inline_decorated_channel_name stream=../sub}}{{/inline}}{{/tr}}</span></template>diff --git a/web/templates/typeahead_list_item.hbs b/web/templates/typeahead_list_item.hbsindex c18684ef760..5d36ae7ecdf 100644--- a/web/templates/typeahead_list_item.hbs+++ b/web/templates/typeahead_list_item.hbs@@ -28,7 +28,7 @@<div class="typeahead-text-container{{#if has_secondary_html}} has_secondary_html{{/if}}"><strong class="typeahead-strong-section{{#if is_empty_string_topic}} empty-topic-display{{/if}}">{{~#if stream~}}- {{~> inline_decorated_stream_name stream=stream ~}}+ {{~> inline_decorated_channel_name stream=stream ~}}{{~else~}}{{~ primary ~}}{{~/if~}}diff --git a/web/templates/user_group_settings/stream_group_permission_settings.hbs b/web/templates/user_group_settings/stream_group_permission_settings.hbsindex a67a57adc38..592e7fd89a3 100644--- a/web/templates/user_group_settings/stream_group_permission_settings.hbs+++ b/web/templates/user_group_settings/stream_group_permission_settings.hbs@@ -1,7 +1,7 @@<div class="settings-subsection-parent" data-stream-id="{{stream.stream_id}}"><div class="subsection-header"><h3>- {{> ../inline_decorated_stream_name stream=stream }}+ {{> ../inline_decorated_channel_name stream=stream }}</h3>{{> ../settings/settings_save_discard_widget show_only_indicator=false }}</div>diff --git a/web/tests/compose_actions.test.cjs b/web/tests/compose_actions.test.cjsindex eac935cc1f2..e86f1b6df13 100644--- a/web/tests/compose_actions.test.cjs+++ b/web/tests/compose_actions.test.cjs@@ -162,7 +162,7 @@ test("start", ({override, override_rewire, mock_template}) => {override_rewire(compose_recipient, "on_compose_select_recipient_update", noop);override_rewire(compose_recipient, "check_posting_policy_for_compose_box", noop);override_rewire(stream_data, "can_post_messages_in_stream", () => true);- mock_template("inline_decorated_stream_name.hbs", false, noop);+ mock_template("inline_decorated_channel_name.hbs", false, noop);let compose_defaults;override(narrow_state, "set_compose_defaults", () => compose_defaults);@@ -311,7 +311,7 @@ test("respond_to_message", ({override, override_rewire, mock_template}) => {override_rewire(compose_recipient, "on_compose_select_recipient_update", noop);override_rewire(compose_recipient, "check_posting_policy_for_compose_box", noop);override_private_message_recipient({override});- mock_template("inline_decorated_stream_name.hbs", false, noop);+ mock_template("inline_decorated_channel_name.hbs", false, noop);override(realm, "realm_direct_message_permission_group", nobody.id);override(realm, "realm_direct_message_initiator_group", everyone.id);@@ -375,7 +375,7 @@ test("reply_with_mention", ({override, override_rewire, mock_template}) => {override_private_message_recipient({override});override_rewire(compose_recipient, "check_posting_policy_for_compose_box", noop);- mock_template("inline_decorated_stream_name.hbs", false, noop);+ mock_template("inline_decorated_channel_name.hbs", false, noop);const denmark = {subscribed: true,