Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
follow_topics: Remove the 'development' guard.
Prakhar Pratyush3f2ab44f9485
diff --git a/web/src/inbox_ui.js b/web/src/inbox_ui.jsindex 6e13f6ef8e0..21ee0f6b305 100644--- a/web/src/inbox_ui.js+++ b/web/src/inbox_ui.js@@ -17,7 +17,6 @@ import {localstorage} from "./localstorage";import * as message_store from "./message_store";import * as modals from "./modals";import * as overlays from "./overlays";-import {page_params} from "./page_params";import * as people from "./people";import * as popovers from "./popovers";import * as sidebar_ui from "./sidebar_ui";@@ -313,15 +312,11 @@ function format_topic(stream_id, topic, topic_unread_count, latest_msg_id) {is_collapsed: collapsed_containers.has(STREAM_HEADER_PREFIX + stream_id),mention_in_unread: unread.topic_has_any_unread_mentions(stream_id, topic),latest_msg_id,- // The following two fields (development & all_visibility_policies)- // are not specific to this context, but this is the easiest way- // we've figured out for passing the data to the template rendering.- development: page_params.development_environment,+ // The 'all_visibility_policies' field is not specific to this context,+ // but this is the easiest way we've figured out for passing the data+ // to the template rendering.all_visibility_policies: user_topics.all_visibility_policies,visibility_policy: user_topics.get_topic_visibility_policy(stream_id, topic),- topic_muted: Boolean(user_topics.is_topic_muted(stream_id, topic)),- topic_unmuted: Boolean(user_topics.is_topic_unmuted(stream_id, topic)),- stream_muted: sub_store.get(stream_id).is_muted,};return context;diff --git a/web/src/message_list_view.js b/web/src/message_list_view.jsindex 996c2d762be..717a4f9b856 100644--- a/web/src/message_list_view.js+++ b/web/src/message_list_view.js@@ -230,20 +230,16 @@ function populate_group_from_message_container(group, message_container) {group.stream_id = -1;} else {group.stream_id = sub.stream_id;- group.stream_muted = sub.is_muted;}group.is_subscribed = stream_data.is_subscribed(group.stream_id);group.topic_is_resolved = resolved_topic.is_resolved(group.topic);- group.topic_muted = user_topics.is_topic_muted(group.stream_id, group.topic);- group.topic_unmuted = user_topics.is_topic_unmuted(group.stream_id, group.topic);group.visibility_policy = user_topics.get_topic_visibility_policy(group.stream_id,group.topic,);- // The following two fields are not specific to this group, but this is the+ // The following field is not specific to this group, but this is the// easiest way we've figured out for passing the data to the template rendering.- group.development = page_params.development_environment;group.all_visibility_policies = user_topics.all_visibility_policies;} else if (group.is_private) {group.pm_with_url = message_container.pm_with_url;diff --git a/web/src/popover_menus_data.js b/web/src/popover_menus_data.jsindex 723dcae1139..4cb7f149db0 100644--- a/web/src/popover_menus_data.js+++ b/web/src/popover_menus_data.js@@ -118,7 +118,6 @@ export function get_actions_popover_content_context(message_id) {export function get_topic_popover_content_context({stream_id, topic_name, url}) {const sub = sub_store.get(stream_id);- const topic_muted = user_topics.is_topic_muted(sub.stream_id, topic_name);const topic_unmuted = user_topics.is_topic_unmuted(sub.stream_id, topic_name);const has_starred_messages = starred_messages.get_count_in_topic(sub.stream_id, topic_name) > 0;const can_move_topic = settings_data.user_can_move_messages_between_streams();@@ -130,7 +129,6 @@ export function get_topic_popover_content_context({stream_id, topic_name, url})stream_id: sub.stream_id,stream_muted: sub.is_muted,topic_name,- topic_muted,topic_unmuted,can_move_topic,can_rename_topic,@@ -141,7 +139,6 @@ export function get_topic_popover_content_context({stream_id, topic_name, url})url,visibility_policy,all_visibility_policies,- development: page_params.development_environment,};}diff --git a/web/src/recent_view_ui.js b/web/src/recent_view_ui.jsindex 098e29f95c2..1247f1bdcb8 100644--- a/web/src/recent_view_ui.js+++ b/web/src/recent_view_ui.js@@ -471,7 +471,6 @@ function format_conversation(conversation_data) {// Stream infocontext.stream_id = last_msg.stream_id;context.stream_name = stream_data.get_stream_name_from_id(last_msg.stream_id);- context.stream_muted = stream_info.is_muted;context.stream_color = stream_info.color;context.stream_url = hash_util.by_stream_url(context.stream_id);context.invite_only = stream_info.invite_only;@@ -484,10 +483,6 @@ function format_conversation(conversation_data) {// We only supply the data to the topic rows and let jquery// display / hide them according to filters instead of// doing complete re-render.- context.topic_muted = Boolean(user_topics.is_topic_muted(context.stream_id, context.topic));- context.topic_unmuted = Boolean(- user_topics.is_topic_unmuted(context.stream_id, context.topic),- );context.mention_in_unread = unread.topic_has_any_unread_mentions(context.stream_id,context.topic,@@ -497,9 +492,8 @@ function format_conversation(conversation_data) {context.stream_id,context.topic,);- // The following two fields are not specific to this context, but this is the+ // The following field is not specific to this context, but this is the// easiest way we've figured out for passing the data to the template rendering.- context.development = page_params.development_environment;context.all_visibility_policies = user_topics.all_visibility_policies;// Since the css for displaying senders in reverse order is much simpler,diff --git a/web/src/settings.js b/web/src/settings.jsindex adba9980c83..a9c36016d28 100644--- a/web/src/settings.js+++ b/web/src/settings.js@@ -109,7 +109,6 @@ export function build_page() {full_name: people.my_full_name(),date_joined_text: get_parsed_date_of_joining(),page_params,- development: page_params.development_environment,enable_sound_select:user_settings.enable_sounds || user_settings.enable_stream_audible_notifications,zuliprc: "zuliprc",diff --git a/web/src/settings_user_topics.js b/web/src/settings_user_topics.jsindex fb5223a36dd..f0d6c90ade2 100644--- a/web/src/settings_user_topics.js+++ b/web/src/settings_user_topics.js@@ -3,7 +3,6 @@ import $ from "jquery";import render_user_topic_ui_row from "../templates/user_topic_ui_row.hbs";import * as ListWidget from "./list_widget";-import {page_params} from "./page_params";import * as scroll_util from "./scroll_util";import * as settings_config from "./settings_config";import * as user_topics from "./user_topics";@@ -32,7 +31,6 @@ export function populate_list() {user_topic,user_topic_visibility_policy_values:settings_config.user_topic_visibility_policy_values,- development: page_params.development_environment,};return render_user_topic_ui_row(context);},diff --git a/web/templates/inbox_view/inbox_row.hbs b/web/templates/inbox_view/inbox_row.hbsindex 7bf96d47120..b4e8a2780de 100644--- a/web/templates/inbox_view/inbox_row.hbs+++ b/web/templates/inbox_view/inbox_row.hbs@@ -47,33 +47,21 @@<div class="inbox-right-part-wrapper"><div class="inbox-right-part">{{#if is_topic}}- {{#if development}}- <span class="visibility-policy-indicator change_visibility_policy hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic_name}}" tabindex="0">- {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}- <i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic'}}"- role="button" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>- {{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}- <i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic'}}"- role="button" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>- {{else if (eq visibility_policy all_visibility_policies.MUTED)}}- <i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic'}}"- role="button" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>- {{else}}- <i class="zulip-icon zulip-icon-inherit recipient_bar_icon" data-tippy-content="{{t 'You will get default notifications for this topic'}}"- role="button" aria-haspopup="true" aria-label="{{t 'You will get default notifications for this topic' }}"></i>- {{/if}}- </span>- {{else}}- <span class="visibility-policy-indicator" tabindex="0">- {{#if stream_muted}}- <i class="zulip-icon zulip-icon-unmute stream_muted {{#if topic_unmuted}}on_hover_topic_mute {{else}}on_hover_topic_unmute {{/if}} recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic_name}}" role="button"- {{#if topic_unmuted}} data-tippy-content="{{t 'Mute topic' }}" aria-label="{{t 'Mute topic' }}" {{else}} data-tippy-content="{{t 'Unmute topic' }}" aria-label="{{t 'Unmute topic' }}" {{/if}} data-tippy-trigger="mouseenter"></i>- {{else}}- <i class="zulip-icon zulip-icon-mute stream_unmuted {{#if topic_muted}}on_hover_topic_unmute {{else}}on_hover_topic_mute {{/if}} recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic_name}}" role="button"- {{#if topic_muted}} data-tippy-content="{{t 'Unmute topic' }}" aria-label="{{t 'Unmute topic' }}" {{else}} data-tippy-content="{{t 'Mute topic' }}" aria-label="{{t 'Mute topic' }}" {{/if}} data-tippy-trigger="mouseenter"></i>- {{/if}}- </span>- {{/if}}+ <span class="visibility-policy-indicator change_visibility_policy hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic_name}}" tabindex="0">+ {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}+ <i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic'}}"+ role="button" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>+ {{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}+ <i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic'}}"+ role="button" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>+ {{else if (eq visibility_policy all_visibility_policies.MUTED)}}+ <i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic'}}"+ role="button" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>+ {{else}}+ <i class="zulip-icon zulip-icon-inherit recipient_bar_icon" data-tippy-content="{{t 'You will get default notifications for this topic'}}"+ role="button" aria-haspopup="true" aria-label="{{t 'You will get default notifications for this topic' }}"></i>+ {{/if}}+ </span>{{/if}}<div class="inbox-action-button inbox-topic-menu"{{#if is_topic}}data-stream-id="{{stream_id}}" data-topic-name="{{topic_name}}"diff --git a/web/templates/recent_view_row.hbs b/web/templates/recent_view_row.hbsindex cabe6fdbb87..e45116a2172 100644--- a/web/templates/recent_view_row.hbs+++ b/web/templates/recent_view_row.hbs@@ -60,31 +60,21 @@</div><div class="recent_topic_actions"><div class="recent_view_focusable hidden-for-spectators">- {{#if development}}- <span class="change_visibility_policy hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}">- {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}- <i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>- {{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}- <i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>- {{else if (eq visibility_policy all_visibility_policies.MUTED)}}- <i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>- {{else}}- <i class="zulip-icon zulip-icon-inherit recipient_bar_icon" data-tippy-content="{{t 'You will get default notifications for this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You will get default notifications for this topic' }}"></i>- {{/if}}- </span>- {{else}}- {{#if stream_muted}}- <i class="zulip-icon zulip-icon-unmute stream_muted {{#if topic_unmuted}}on_hover_topic_mute {{else}}on_hover_topic_unmute {{/if}} recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" role="button" tabindex="0"- {{#if topic_unmuted}} data-tippy-content="{{t 'Mute topic' }}" aria-label="{{t 'Mute topic' }}" {{else}} data-tippy-content="{{t 'Unmute topic' }}" aria-label="{{t 'Unmute topic' }}" {{/if}} data-tippy-trigger="mouseenter"></i>+ <span class="change_visibility_policy hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}">+ {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}+ <i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>+ {{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}+ <i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>+ {{else if (eq visibility_policy all_visibility_policies.MUTED)}}+ <i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>{{else}}- <i class="zulip-icon zulip-icon-mute stream_unmuted {{#if topic_muted}}on_hover_topic_unmute {{else}}on_hover_topic_mute {{/if}} recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" role="button" tabindex="0"- {{#if topic_muted}} data-tippy-content="{{t 'Unmute topic' }}" aria-label="{{t 'Unmute topic' }}" {{else}} data-tippy-content="{{t 'Mute topic' }}" aria-label="{{t 'Mute topic' }}" {{/if}} data-tippy-trigger="mouseenter"></i>+ <i class="zulip-icon zulip-icon-inherit recipient_bar_icon" data-tippy-content="{{t 'You will get default notifications for this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You will get default notifications for this topic' }}"></i>{{/if}}- {{/if}}+ </span></div></div>{{/if}}diff --git a/web/templates/recipient_row.hbs b/web/templates/recipient_row.hbsindex 6e061209246..9c36935ba10 100644--- a/web/templates/recipient_row.hbs+++ b/web/templates/recipient_row.hbs@@ -59,31 +59,21 @@{{/if}}{{#if is_subscribed}}- {{#if development}}- <span class="change_visibility_policy hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}">- {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}- <i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>- {{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}- <i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>- {{else if (eq visibility_policy all_visibility_policies.MUTED)}}- <i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>- {{else}}- <i class="zulip-icon zulip-icon-inherit recipient_bar_icon" data-tippy-content="{{t 'You will get default notifications for this topic'}}"- role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You will get default notifications for this topic' }}"></i>- {{/if}}- </span>- {{else}}- {{#if stream_muted}}- <i class="zulip-icon zulip-icon-unmute stream_muted {{#if topic_unmuted}} on_hover_topic_mute {{else}} on_hover_topic_unmute {{/if}} recipient_bar_icon hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" role="button" tabindex="0"- {{#if topic_unmuted}} data-tooltip-template-id="topic-mute-tooltip-template" aria-label="{{t 'Mute topic' }}" {{else}} data-tooltip-template-id="topic-unmute-tooltip-template" aria-label="{{t 'Unmute topic' }}" {{/if}}></i>+ <span class="change_visibility_policy hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}">+ {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}+ <i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>+ {{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}+ <i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>+ {{else if (eq visibility_policy all_visibility_policies.MUTED)}}+ <i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>{{else}}- <i class="zulip-icon zulip-icon-mute stream_unmuted{{#if topic_muted}} on_hover_topic_unmute {{else}} on_hover_topic_mute {{/if}} recipient_bar_icon hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" role="button" tabindex="0"- {{#if topic_muted}} data-tooltip-template-id="topic-unmute-tooltip-template" aria-label="{{t 'Unmute topic' }}" {{else}} data-tooltip-template-id="topic-mute-tooltip-template" aria-label="{{t 'Mute topic' }}" {{/if}}></i>+ <i class="zulip-icon zulip-icon-inherit recipient_bar_icon" data-tippy-content="{{t 'You will get default notifications for this topic'}}"+ role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You will get default notifications for this topic' }}"></i>{{/if}}- {{/if}}+ </span>{{/if}}</span><span class="recipient_row_date {{#if date_unchanged}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span>diff --git a/web/templates/settings/notification_settings.hbs b/web/templates/settings/notification_settings.hbsindex 6d36bfa966a..11aa37c1f21 100644--- a/web/templates/settings/notification_settings.hbs+++ b/web/templates/settings/notification_settings.hbs@@ -28,18 +28,16 @@</thead><tbody>{{#each general_settings}}- {{#unless (and (eq this.label "Followed topics") (not ../development))}}- <tr>- <td>{{ this.label }}</td>- {{#each this.notification_settings}}- {{> notification_settings_checkboxes- setting_name=this.setting_name- is_checked=this.is_checked- is_disabled=this.is_disabled- prefix=../../prefix }}- {{/each}}- </tr>- {{/unless}}+ <tr>+ <td>{{ this.label }}</td>+ {{#each this.notification_settings}}+ {{> notification_settings_checkboxes+ setting_name=this.setting_name+ is_checked=this.is_checked+ is_disabled=this.is_disabled+ prefix=../../prefix }}+ {{/each}}+ </tr>{{/each}}</tbody>{{#unless for_realm_settings}}@@ -49,34 +47,32 @@</table></div>- {{#if development}}- <div class="topic_notifications m-10 {{#if for_realm_settings}}settings-subsection-parent{{else}}subsection-parent{{/if}}">+ <div class="topic_notifications m-10 {{#if for_realm_settings}}settings-subsection-parent{{else}}subsection-parent{{/if}}">- <div class="subsection-header inline-block">- <h3>{{t "Topic notifications" }}- {{> ../help_link_widget link="/help/mute-a-topic" }}- </h3>- {{> settings_save_discard_widget section_name="topic-notifications-settings" show_only_indicator=(not for_realm_settings) }}- <p>{{t "You will automatically follow topics that you have configured to both follow and unmute." }}</p>- </div>+ <div class="subsection-header inline-block">+ <h3>{{t "Topic notifications" }}+ {{> ../help_link_widget link="/help/mute-a-topic" }}+ </h3>+ {{> settings_save_discard_widget section_name="topic-notifications-settings" show_only_indicator=(not for_realm_settings) }}+ <p>{{t "You will automatically follow topics that you have configured to both follow and unmute." }}</p>+ </div>- <div class="input-group">- <label for="automatically_follow_topics_policy" class="dropdown-title">{{ settings_label.automatically_follow_topics_policy }}</label>- <select name="automatically_follow_topics_policy" class="setting_automatically_follow_topics_policy prop-element settings_select bootstrap-focus-style"- id="{{prefix}}automatically_follow_topics_policy" data-setting-widget-type="number">- {{> dropdown_options_widget option_values=automatically_follow_topics_policy_values}}- </select>- </div>+ <div class="input-group">+ <label for="automatically_follow_topics_policy" class="dropdown-title">{{ settings_label.automatically_follow_topics_policy }}</label>+ <select name="automatically_follow_topics_policy" class="setting_automatically_follow_topics_policy prop-element settings_select bootstrap-focus-style"+ id="{{prefix}}automatically_follow_topics_policy" data-setting-widget-type="number">+ {{> dropdown_options_widget option_values=automatically_follow_topics_policy_values}}+ </select>+ </div>- <div class="input-group">- <label for="automatically_unmute_topics_in_muted_streams_policy" class="dropdown-title">{{ settings_label.automatically_unmute_topics_in_muted_streams_policy }}</label>- <select name="automatically_unmute_topics_in_muted_streams_policy" class="setting_automatically_unmute_topics_in_muted_streams_policy prop-element settings_select bootstrap-focus-style"- id="{{prefix}}automatically_unmute_topics_in_muted_streams_policy" data-setting-widget-type="number">- {{> dropdown_options_widget option_values=automatically_unmute_topics_in_muted_streams_policy_values}}- </select>- </div>+ <div class="input-group">+ <label for="automatically_unmute_topics_in_muted_streams_policy" class="dropdown-title">{{ settings_label.automatically_unmute_topics_in_muted_streams_policy }}</label>+ <select name="automatically_unmute_topics_in_muted_streams_policy" class="setting_automatically_unmute_topics_in_muted_streams_policy prop-element settings_select bootstrap-focus-style"+ id="{{prefix}}automatically_unmute_topics_in_muted_streams_policy" data-setting-widget-type="number">+ {{> dropdown_options_widget option_values=automatically_unmute_topics_in_muted_streams_policy_values}}+ </select></div>- {{/if}}+ </div><div class="desktop_notifications m-10 {{#if for_realm_settings}}settings-subsection-parent{{else}}subsection-parent{{/if}}">diff --git a/web/templates/topic_sidebar_actions.hbs b/web/templates/topic_sidebar_actions.hbsindex bdd172ea117..428aef25b7d 100644--- a/web/templates/topic_sidebar_actions.hbs+++ b/web/templates/topic_sidebar_actions.hbs@@ -8,62 +8,26 @@<hr />- {{#if development}}- <li class="hidden-for-spectators">- <div class="tabs-container">- <div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.MUTED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.MUTED}}" data-tippy-content="{{t 'Mute' }}" aria-label="{{t 'Mute' }}">- <i class="zulip-icon zulip-icon-mute-new"></i>- </div>- <div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.INHERIT)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.INHERIT}}" data-tippy-content="{{t 'Default' }}" aria-label="{{t 'Default' }}">- <i class="zulip-icon zulip-icon-inherit"></i>- </div>- {{#if (or stream_muted topic_unmuted)}}- <div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.UNMUTED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.UNMUTED}}" data-tippy-content="{{t 'Unmute' }}" aria-label="{{t 'Unmute' }}">- <i class="zulip-icon zulip-icon-unmute-new"></i>- </div>- {{/if}}- <div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.FOLLOWED}}" data-tippy-content="{{t 'Follow' }}" aria-label="{{t 'Follow' }}">- <i class="zulip-icon zulip-icon-follow"></i>+ <li class="hidden-for-spectators">+ <div class="tabs-container">+ <div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.MUTED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.MUTED}}" data-tippy-content="{{t 'Mute' }}" aria-label="{{t 'Mute' }}">+ <i class="zulip-icon zulip-icon-mute-new"></i>+ </div>+ <div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.INHERIT)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.INHERIT}}" data-tippy-content="{{t 'Default' }}" aria-label="{{t 'Default' }}">+ <i class="zulip-icon zulip-icon-inherit"></i>+ </div>+ {{#if (or stream_muted topic_unmuted)}}+ <div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.UNMUTED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.UNMUTED}}" data-tippy-content="{{t 'Unmute' }}" aria-label="{{t 'Unmute' }}">+ <i class="zulip-icon zulip-icon-unmute-new"></i></div>+ {{/if}}+ <div class="tab-option tippy-zulip-tooltip {{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}selected-tab{{/if}}" data-visibility-policy="{{all_visibility_policies.FOLLOWED}}" data-tippy-content="{{t 'Follow' }}" aria-label="{{t 'Follow' }}">+ <i class="zulip-icon zulip-icon-follow"></i></div>- </li>+ </div>+ </li>- <hr/>- {{else}}- {{#if stream_muted}}- {{#unless topic_unmuted}}- <li class="hidden-for-spectators">- <a tabindex="0" class="sidebar-popover-unmute-topic" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">- <i class="zulip-icon zulip-icon-unmute" aria-hidden="true"></i>- {{t "Unmute topic"}}- </a>- </li>- {{else}}- <li class="hidden-for-spectators">- <a tabindex="0" class="sidebar-popover-remove-unmute" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">- <i class="zulip-icon zulip-icon-mute" aria-hidden="true"></i>- {{t "Mute topic"}}- </a>- </li>- {{/unless}}- {{else}}- {{#unless topic_muted}}- <li class="hidden-for-spectators">- <a tabindex="0" class="sidebar-popover-mute-topic" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">- <i class="zulip-icon zulip-icon-mute" aria-hidden="true"></i>- {{t "Mute topic"}}- </a>- </li>- {{else}}- <li class="hidden-for-spectators">- <a tabindex="0" class="sidebar-popover-remove-mute" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">- <i class="zulip-icon zulip-icon-unmute" aria-hidden="true"></i>- {{t "Unmute topic"}}- </a>- </li>- {{/unless}}- {{/if}}- {{/if}}+ <hr/>{{#if has_starred_messages}}<li class="hidden-for-spectators">diff --git a/web/templates/user_topic_ui_row.hbs b/web/templates/user_topic_ui_row.hbsindex 77ca2552fc5..ae4e21749df 100644--- a/web/templates/user_topic_ui_row.hbs+++ b/web/templates/user_topic_ui_row.hbs@@ -5,9 +5,7 @@<td><select class="settings_user_topic_visibility_policy prop-element list_select bootstrap-focus-style" data-setting-widget-type="number">{{#each ../user_topic_visibility_policy_values}}- {{#unless (and (eq this.description "Followed") (not ../../development))}}- <option value='{{this.code}}' {{#if (eq this.code ../visibility_policy)}}selected{{/if}}>{{this.description}}</option>- {{/unless}}+ <option value='{{this.code}}' {{#if (eq this.code ../visibility_policy)}}selected{{/if}}>{{this.description}}</option>{{/each}}</select></td>diff --git a/web/tests/recent_view.test.js b/web/tests/recent_view.test.jsindex 19b6b14be9e..d320281e652 100644--- a/web/tests/recent_view.test.js+++ b/web/tests/recent_view.test.js@@ -117,12 +117,6 @@ mock_esm("../src/user_topics", {}return false;},- is_topic_unmuted(stream_id, topic) {- if (stream_id === stream6 && topic === topic11) {- return true;- }- return false;- },is_topic_unmuted_or_followed(stream_id, topic) {if (stream_id === stream6 && (topic === topic11 || topic === topic12)) {return true;@@ -398,17 +392,13 @@ function generate_topic_data(topic_info_array) {stream_name: "stream_name",stream_color: "",stream_id,- stream_muted: undefined,stream_url: "https://www.example.com",topic,conversation_key: get_topic_key(stream_id, topic),topic_url: "https://www.example.com",unread_count,mention_in_unread: false,- topic_muted: visibility_policy === all_visibility_policies.MUTED,- topic_unmuted: visibility_policy === all_visibility_policies.UNMUTED,visibility_policy,- development: true,all_visibility_policies,});}