Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Remove unused code for can_add_subscribers_group label.
Sahil Batrad29ac45b99d9
diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.pyindex 6ca84803f40..043c2565920 100644--- a/tools/lib/capitalization.py+++ b/tools/lib/capitalization.py@@ -178,8 +178,6 @@ IGNORED_PHRASES = [r"hours",r"days",r"weeks",- # Used in "Who can subscribe others to this channel" label.- r"must be subscribed",# Used in "Who can subscribe to this channel" label.r"everyone except guests can subscribe to any public channel",]diff --git a/web/src/stream_create.ts b/web/src/stream_create.tsindex c9a0e264569..7881e806bcc 100644--- a/web/src/stream_create.ts+++ b/web/src/stream_create.ts@@ -514,7 +514,6 @@ export function show_new_stream_modal(): void {// set default state for "announce stream" and "default stream" option.$("#stream_creation_form .default-stream input").prop("checked", false);update_announce_stream_state();- stream_ui_updates.update_can_add_subscribers_group_label($("#stream-creation"));stream_ui_updates.update_can_subscribe_group_label($("#stream-creation"));stream_ui_updates.update_default_stream_and_stream_privacy_state($("#stream-creation"));clear_error_display();@@ -547,10 +546,6 @@ export function set_up_handlers(): void {update_announce_stream_state();stream_ui_updates.update_default_stream_and_stream_privacy_state($container);stream_ui_updates.update_can_subscribe_group_label($container);- // We update the label on `can_add_subscribers_groups` in the- // listener attached to `.stream-privacy-values input` on- // `#channels_overlay_container` which covers both stream- // create and edit scenarios.});$container.on("change", ".default-stream input", () => {diff --git a/web/src/stream_edit.ts b/web/src/stream_edit.tsindex 15e6690c5a1..0c1e5ccc3a3 100644--- a/web/src/stream_edit.ts+++ b/web/src/stream_edit.ts@@ -286,7 +286,6 @@ export function show_settings_for(node: HTMLElement): void {settings_org.set_message_retention_setting_dropdown(sub);stream_ui_updates.enable_or_disable_permission_settings_in_edit_panel(sub);setup_group_setting_widgets(slim_sub);- stream_ui_updates.update_can_add_subscribers_group_label($edit_container);stream_ui_updates.update_can_subscribe_group_label($edit_container);$("#channels_overlay_container").on(@@ -812,11 +811,6 @@ export function initialize(): void {},);- // This takes care of both stream create and edit.- $("#channels_overlay_container").on("change", ".stream-privacy-values input", () => {- stream_ui_updates.update_can_add_subscribers_group_label($("#channels_overlay_container"));- });-$("#channels_overlay_container").on("click",".subsection-header .subsection-changes-save button",diff --git a/web/src/stream_ui_updates.ts b/web/src/stream_ui_updates.tsindex 2f318c9bc56..bc60a25ffac 100644--- a/web/src/stream_ui_updates.ts+++ b/web/src/stream_ui_updates.ts@@ -3,7 +3,6 @@ import assert from "minimalistic-assert";import type * as tippy from "tippy.js";import render_announce_stream_checkbox from "../templates/stream_settings/announce_stream_checkbox.hbs";-import render_stream_can_add_subscribers_group_label from "../templates/stream_settings/stream_can_add_subscribers_group_label.hbs";import render_stream_can_subscribe_group_label from "../templates/stream_settings/stream_can_subscribe_group_label.hbs";import render_stream_privacy_icon from "../templates/stream_settings/stream_privacy_icon.hbs";import render_stream_settings_tip from "../templates/stream_settings/stream_settings_tip.hbs";@@ -259,17 +258,6 @@ export function update_default_stream_and_stream_privacy_state($container: JQuerupdate_private_stream_privacy_option_state($container, is_default_stream);}-export function update_can_add_subscribers_group_label($container: JQuery): void {- const privacy_type = $container.find("input[type=radio][name=privacy]:checked").val();- const is_invite_only =- privacy_type === "invite-only" || privacy_type === "invite-only-public-history";-- const $can_add_subscribers_group_label = $("#group_setting_label_can_add_subscribers_group");- $can_add_subscribers_group_label.html(- render_stream_can_add_subscribers_group_label({is_invite_only}),- );-}-export function update_can_subscribe_group_label($container: JQuery): void {const privacy_type = $container.find("input[type=radio][name=privacy]:checked").val();const is_invite_only =diff --git a/web/templates/settings/group_setting_value_pill_input.hbs b/web/templates/settings/group_setting_value_pill_input.hbsindex 370d6aadc66..4134ae7970c 100644--- a/web/templates/settings/group_setting_value_pill_input.hbs+++ b/web/templates/settings/group_setting_value_pill_input.hbs@@ -1,8 +1,8 @@<div class="input-group">- {{!-- We are using snake case for the id and one of the classes since- setting_name is always in snake case and it would be weird to have the- resultant id be a mix of two types of cases. --}}- <label class="group-setting-label {{setting_name}}_label" id="group_setting_label_{{setting_name}}">+ {{!-- We are using snake case for one of the classes since setting_name+ is always in snake case and it would be weird to have the resultant id+ be a mix of two types of cases. --}}+ <label class="group-setting-label {{setting_name}}_label">{{label}}{{#if label_parens_text}}(<i>{{label_parens_text}}</i>){{/if}}{{#if help_link}}diff --git a/web/templates/stream_settings/stream_can_add_subscribers_group_label.hbs b/web/templates/stream_settings/stream_can_add_subscribers_group_label.hbsdeleted file mode 100644index d5de15a0ec9..00000000000--- a/web/templates/stream_settings/stream_can_add_subscribers_group_label.hbs+++ /dev/null@@ -1 +0,0 @@-{{t 'Who can subscribe anyone to this channel'}}