Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
channel_privacy: Rename inline_decorated_channel_name.
Sayam Samal85130740c13a
diff --git a/web/src/compose_recipient.ts b/web/src/compose_recipient.tsindex 758727d66af..932c86bf1f3 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_channel_name from "../templates/inline_decorated_channel_name.hbs";+import render_decorated_channel_name from "../templates/decorated_channel_name.hbs";import * as compose_banner from "./compose_banner.ts";import * as compose_fade from "./compose_fade.ts";@@ -226,7 +226,7 @@ function update_recipient_label(stream_id?: number): void {);} else {$("#compose_select_recipient_widget .dropdown_widget_value").html(- render_inline_decorated_channel_name({stream, show_colored_icon: true}),+ render_decorated_channel_name({stream, show_colored_icon: true}),);}}diff --git a/web/src/dropdown_widget.ts b/web/src/dropdown_widget.tsindex 67ffd8be630..cbc6a3c727a 100644--- a/web/src/dropdown_widget.ts+++ b/web/src/dropdown_widget.ts@@ -2,12 +2,12 @@ import $ from "jquery";import assert from "minimalistic-assert";import * as tippy from "tippy.js";+import render_decorated_channel_name from "../templates/decorated_channel_name.hbs";import render_dropdown_current_value_not_in_options from "../templates/dropdown_current_value_not_in_options.hbs";import render_dropdown_disabled_state from "../templates/dropdown_disabled_state.hbs";import render_dropdown_italic_state from "../templates/dropdown_italic_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_channel_name from "../templates/inline_decorated_channel_name.hbs";import * as blueslip from "./blueslip.ts";import * as ListWidget from "./list_widget.ts";@@ -775,7 +775,7 @@ export class DropdownWidget {$(this.widget_value_selector).html(render_dropdown_italic_state({name: option.name}));} else if (option.stream) {$(this.widget_value_selector).html(- render_inline_decorated_channel_name({+ render_decorated_channel_name({stream: option.stream,show_colored_icon: true,}),diff --git a/web/src/stream_edit.ts b/web/src/stream_edit.tsindex bf2c02e417e..7924c72b7e7 100644--- a/web/src/stream_edit.ts+++ b/web/src/stream_edit.ts@@ -6,7 +6,7 @@ import * as z from "zod/mini";import render_settings_deactivation_stream_modal from "../templates/confirm_dialog/confirm_deactivate_stream.hbs";import render_settings_reactivation_stream_modal from "../templates/confirm_dialog/confirm_reactivate_stream.hbs";-import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";+import render_decorated_channel_name from "../templates/decorated_channel_name.hbs";import render_change_stream_info_modal from "../templates/stream_settings/change_stream_info_modal.hbs";import render_channel_name_conflict_error from "../templates/stream_settings/channel_name_conflict_error.hbs";import render_copy_email_address_modal from "../templates/stream_settings/copy_email_address_modal.hbs";@@ -876,7 +876,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_channel_name({stream});+ const stream_name_with_privacy_symbol_html = render_decorated_channel_name({stream});const is_moderation_request_channel =stream_id === realm.realm_moderation_request_channel_id;@@ -938,7 +938,7 @@ export function initialize(): void {}const stream = sub_store.get(stream_id);- const stream_name_with_privacy_symbol_html = render_inline_decorated_channel_name({stream});+ const stream_name_with_privacy_symbol_html = render_decorated_channel_name({stream});const modal_content_html = render_settings_reactivation_stream_modal();confirm_dialog.launch({diff --git a/web/src/stream_edit_subscribers.ts b/web/src/stream_edit_subscribers.tsindex 909647387ab..e4213332dff 100644--- a/web/src/stream_edit_subscribers.ts+++ b/web/src/stream_edit_subscribers.ts@@ -4,7 +4,7 @@ import * as z from "zod/mini";import render_subscription_banner from "../templates/components/subscription_banner.hbs";import render_unsubscribe_private_stream_modal from "../templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs";-import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";+import render_decorated_channel_name from "../templates/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";@@ -434,7 +434,7 @@ function remove_subscriber({return;}- const stream_name_with_privacy_symbol_html = render_inline_decorated_channel_name({+ const stream_name_with_privacy_symbol_html = render_decorated_channel_name({stream: sub,});diff --git a/web/src/stream_popover.ts b/web/src/stream_popover.tsindex 233fb3c3cbe..44db8d1d18d 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 * as z from "zod/mini";-import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";+import render_decorated_channel_name from "../templates/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_unsubscribed_participants_warning_banner from "../templates/modal_banner/unsubscribed_participants_warning_banner.hbs";@@ -881,7 +881,7 @@ export async function build_move_topic_to_stream_popover();} else {$("#move_topic_to_stream_widget .dropdown_widget_value").html(- render_inline_decorated_channel_name({stream, show_colored_icon: true}),+ render_decorated_channel_name({stream, show_colored_icon: true}),);}}diff --git a/web/src/stream_settings_components.ts b/web/src/stream_settings_components.tsindex 149923438d7..8cdfdfd1511 100644--- a/web/src/stream_settings_components.ts+++ b/web/src/stream_settings_components.ts@@ -2,7 +2,7 @@ import $ from "jquery";import * as z from "zod/mini";import render_unsubscribe_private_stream_modal from "../templates/confirm_dialog/confirm_unsubscribe_private_stream.hbs";-import render_inline_decorated_channel_name from "../templates/inline_decorated_channel_name.hbs";+import render_decorated_channel_name from "../templates/decorated_channel_name.hbs";import render_new_channel_members_title from "../templates/stream_settings/new_channel_members_title.hbs";import render_selected_stream_title from "../templates/stream_settings/selected_stream_title.hbs";@@ -273,7 +273,7 @@ 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_channel_name({+ const stream_name_with_privacy_symbol_html = render_decorated_channel_name({stream: sub,});diff --git a/web/templates/confirm_dialog/confirm_reset_stream_notifications.hbs b/web/templates/confirm_dialog/confirm_reset_stream_notifications.hbsindex bf2e032c196..41b31c209dd 100644--- a/web/templates/confirm_dialog/confirm_reset_stream_notifications.hbs+++ b/web/templates/confirm_dialog/confirm_reset_stream_notifications.hbs@@ -1,4 +1,4 @@{{#tr}}Are you sure you want to reset notifications for <z-stream></z-stream>?-{{#*inline "z-stream"}}{{> ../inline_decorated_channel_name stream=sub show_colored_icon=false}}{{/inline}}+{{#*inline "z-stream"}}{{> ../decorated_channel_name stream=sub show_colored_icon=false}}{{/inline}}{{/tr}}diff --git a/web/templates/inline_decorated_channel_name.hbs b/web/templates/decorated_channel_name.hbssimilarity index 100%rename from web/templates/inline_decorated_channel_name.hbsrename to web/templates/decorated_channel_name.hbsdiff --git a/web/templates/dropdown_list.hbs b/web/templates/dropdown_list.hbsindex 1bb7cfd9079..b96877ad59f 100644--- a/web/templates/dropdown_list.hbs+++ b/web/templates/dropdown_list.hbs@@ -29,7 +29,7 @@{{else}}<a class="dropdown-list-item-common-styles {{#if is_setting_disabled}}setting-disabled-option{{/if}} {{#if make_italic}}italic{{/if}}">{{#if stream}}- {{> inline_decorated_channel_name stream=stream show_colored_icon=true}}+ {{> decorated_channel_name stream=stream show_colored_icon=true}}{{else if is_direct_message}}<i class="zulip-icon zulip-icon-users channel-privacy-type-icon"></i> <span class="decorated-dm-name">{{name}}</span>{{else if is_setting_disabled}}diff --git a/web/templates/inline_stream_or_topic_reference.hbs b/web/templates/inline_stream_or_topic_reference.hbsindex 6afcce2b9c3..3d31929973e 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_channel_name stream=stream show_colored_icon=show_colored_icon}}+ {{> 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/modal_banner/unsubscribed_participants_warning_banner.hbs b/web/templates/modal_banner/unsubscribed_participants_warning_banner.hbsindex 8a7d75ef5ae..37d76d08375 100644--- a/web/templates/modal_banner/unsubscribed_participants_warning_banner.hbs+++ b/web/templates/modal_banner/unsubscribed_participants_warning_banner.hbs@@ -10,7 +10,7 @@{{~/list_each ~}}){{~/inline}}- {{#*inline "z-stream"}}<strong class="highlighted-element">{{> ../inline_decorated_channel_name stream=stream}}</strong>{{/inline}}+ {{#*inline "z-stream"}}<strong class="highlighted-element">{{> ../decorated_channel_name stream=stream}}</strong>{{/inline}}{{/tr}}{{else if few_unsubscribed_participants}}@@ -23,13 +23,13 @@{{~/list_each ~}}){{~/inline}}- {{#*inline "z-stream"}}<strong class="highlighted-element">{{> ../inline_decorated_channel_name stream=stream}}</strong>{{/inline}}+ {{#*inline "z-stream"}}<strong class="highlighted-element">{{> ../decorated_channel_name stream=stream}}</strong>{{/inline}}{{/tr}}{{else}}{{#tr}}{unsubscribed_participants_count} topic participants are not subscribed to <z-stream></z-stream>.- {{#*inline "z-stream"}}<strong class="highlighted-element">{{> ../inline_decorated_channel_name stream=stream}}</strong>{{/inline}}+ {{#*inline "z-stream"}}<strong class="highlighted-element">{{> ../decorated_channel_name stream=stream}}</strong>{{/inline}}{{/tr}}{{/if}}</p>diff --git a/web/templates/skipped_marking_unread.hbs b/web/templates/skipped_marking_unread.hbsindex 258041c24cf..a6af762d7ee 100644--- a/web/templates/skipped_marking_unread.hbs+++ b/web/templates/skipped_marking_unread.hbs@@ -3,7 +3,7 @@{{#*inline "z-streams" ~}}<strong>{{~#list_each streams as |stream| ~}}- {{> inline_decorated_channel_name stream=stream}}+ {{> decorated_channel_name stream=stream}}{{~/list_each ~}}</strong>{{~/inline}}diff --git a/web/templates/stream_settings/announce_stream_checkbox.hbs b/web/templates/stream_settings/announce_stream_checkbox.hbsindex 9b3ee3a1708..9235b483c9d 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_channel_name+ {{> ../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 b9acac3cbc9..a654f0077a9 100644--- a/web/templates/stream_settings/browse_streams_list_item.hbs+++ b/web/templates/stream_settings/browse_streams_list_item.hbs@@ -9,7 +9,7 @@<span>{{#tr}}Unsubscribe from <z-stream></z-stream>- {{#*inline "z-stream"}}{{> ../inline_decorated_channel_name stream=this}}{{/inline}}+ {{#*inline "z-stream"}}{{> ../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_channel_name stream=this}}{{/inline}}+ {{#*inline "z-stream"}}{{> ../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_channel_name stream=this}}{{/inline}}+ {{#*inline "z-stream"}}{{> ../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 4df9fd8059a..af460ea4af1 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 class="highlighted-element">{{> ../inline_decorated_channel_name stream=stream}}</b>{{/inline}}+ {{#*inline "z-stream"}}<b class="highlighted-element">{{> ../decorated_channel_name stream=stream}}</b>{{/inline}}{{/tr}}</li><li>diff --git a/web/templates/stream_settings/selected_stream_title.hbs b/web/templates/stream_settings/selected_stream_title.hbsindex dfbbab61a72..ea7606d1bb2 100644--- a/web/templates/stream_settings/selected_stream_title.hbs+++ b/web/templates/stream_settings/selected_stream_title.hbs@@ -11,7 +11,7 @@<span class="view-channel-text">{{#tr}}View <z-channel-name></z-channel-name>- {{#*inline "z-channel-name"}}{{> ../inline_decorated_channel_name stream=sub}}{{/inline}}+ {{#*inline "z-channel-name"}}{{> ../decorated_channel_name stream=sub}}{{/inline}}{{/tr}}</span>{{tooltip_hotkey_hints "Shift" "V"}}@@ -24,7 +24,7 @@<span>{{#tr}}Cannot subscribe to private channel <z-stream></z-stream>- {{#*inline "z-stream"}}{{> ../inline_decorated_channel_name stream=../sub}}{{/inline}}+ {{#*inline "z-stream"}}{{> ../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 70bcbea5994..d252ca8f2b4 100644--- a/web/templates/typeahead_list_item.hbs+++ b/web/templates/typeahead_list_item.hbs@@ -31,7 +31,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 is_default_language}} default-language-display{{/if}}">{{~#if stream~}}- {{~> inline_decorated_channel_name stream=stream ~}}+ {{~> 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 dd8fbcbfce2..89932c9435b 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_channel_name stream=stream }}+ {{> ../decorated_channel_name stream=stream }}</h3>{{> ../settings/settings_save_discard_widget show_save_discard_buttons=true }}</div>diff --git a/web/tests/compose_actions.test.cjs b/web/tests/compose_actions.test.cjsindex d84f1bbf7e6..c2cd269d99c 100644--- a/web/tests/compose_actions.test.cjs+++ b/web/tests/compose_actions.test.cjs@@ -192,7 +192,7 @@ test("start", ({override, override_rewire, mock_template}) => {override_rewire(compose_recipient, "update_recipient_row_attention_level", noop);override_rewire(stream_data, "can_post_messages_in_stream", () => true);override_rewire(stream_data, "can_create_new_topics_in_stream", () => true);- mock_template("inline_decorated_channel_name.hbs", false, () => "");+ mock_template("decorated_channel_name.hbs", false, () => "");let compose_defaults;override(narrow_state, "set_compose_defaults", () => compose_defaults);@@ -345,7 +345,7 @@ test("respond_to_message", ({override, override_rewire, mock_template}) => {override_rewire(compose_validate, "update_posting_policy_banner_post_validation", noop);override_rewire(compose_recipient, "update_recipient_row_attention_level", noop);override_private_message_recipient_ids({override});- mock_template("inline_decorated_channel_name.hbs", false, () => "");+ mock_template("decorated_channel_name.hbs", false, () => "");override(realm, "realm_direct_message_permission_group", nobody.id);override(realm, "realm_direct_message_initiator_group", everyone.id);@@ -411,7 +411,7 @@ test("reply_with_mention", ({override, override_rewire, mock_template}) => {$elem.set_find_results(".message-limit-indicator", $indicator);override_private_message_recipient_ids({override});- mock_template("inline_decorated_channel_name.hbs", false, () => "");+ mock_template("decorated_channel_name.hbs", false, () => "");override_rewire(stream_data, "can_post_messages_in_stream", () => true);