Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
js: Rename muting_ui module to muted_topics_ui.
Priyank Patel261df2b4dce5
diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.jsindex ca84154ff98..a4aba518b8d 100644--- a/frontend_tests/node_tests/dispatch.js+++ b/frontend_tests/node_tests/dispatch.js@@ -32,7 +32,7 @@ const message_edit = mock_esm("../../static/js/message_edit");const message_events = mock_esm("../../static/js/message_events");const message_list = mock_esm("../../static/js/message_list");const message_lists = mock_esm("../../static/js/message_lists");-const muting_ui = mock_esm("../../static/js/muting_ui");+const muted_topics_ui = mock_esm("../../static/js/muted_topics_ui");const muted_users_ui = mock_esm("../../static/js/muted_users_ui");const night_mode = mock_esm("../../static/js/night_mode");const notifications = mock_esm("../../static/js/notifications");@@ -235,7 +235,7 @@ run_test("muted_topics", ({override}) => {const event = event_fixtures.muted_topics;const stub = make_stub();- override(muting_ui, "handle_topic_updates", stub.f);+ override(muted_topics_ui, "handle_topic_updates", stub.f);dispatch(event);assert.equal(stub.num_calls, 1);const args = stub.get_args("muted_topics");diff --git a/frontend_tests/node_tests/hotkey.js b/frontend_tests/node_tests/hotkey.jsindex 859a2801fdb..7595e2e3d98 100644--- a/frontend_tests/node_tests/hotkey.js+++ b/frontend_tests/node_tests/hotkey.js@@ -51,7 +51,7 @@ const lightbox = mock_esm("../../static/js/lightbox");const list_util = mock_esm("../../static/js/list_util");const message_edit = mock_esm("../../static/js/message_edit");const message_lists = mock_esm("../../static/js/message_lists");-const muting_ui = mock_esm("../../static/js/muting_ui");+const muted_topics_ui = mock_esm("../../static/js/muted_topics_ui");const narrow = mock_esm("../../static/js/narrow");const navigate = mock_esm("../../static/js/navigate");const overlays = mock_esm("../../static/js/overlays", {@@ -383,7 +383,7 @@ run_test("emoji picker", ({override}) => {run_test("G/M keys", () => {// TODO: moveassert_mapping("G", navigate, "to_end");- assert_mapping("M", muting_ui, "toggle_topic_mute");+ assert_mapping("M", muted_topics_ui, "toggle_topic_mute");});run_test("n/p keys", () => {diff --git a/frontend_tests/node_tests/settings_muted_topics.js b/frontend_tests/node_tests/settings_muted_topics.jsindex 0c5498d4655..5d81d93c36e 100644--- a/frontend_tests/node_tests/settings_muted_topics.js+++ b/frontend_tests/node_tests/settings_muted_topics.js@@ -6,7 +6,7 @@ const {mock_esm, zrequire} = require("../zjsunit/namespace");const {run_test} = require("../zjsunit/test");const $ = require("../zjsunit/zjquery");-const muting_ui = mock_esm("../../static/js/muting_ui");+const muted_topics_ui = mock_esm("../../static/js/muted_topics_ui");const settings_muted_topics = zrequire("settings_muted_topics");const stream_data = zrequire("stream_data");@@ -72,7 +72,7 @@ run_test("settings", ({override}) => {};let unmute_topic_called = false;- muting_ui.unmute_topic = (stream_id, topic) => {+ muted_topics_ui.unmute_topic = (stream_id, topic) => {assert.equal(stream_id, frontend.stream_id);assert.equal(topic, "js");unmute_topic_called = true;diff --git a/static/js/click_handlers.js b/static/js/click_handlers.jsindex ba7409432f6..ffe8036dff1 100644--- a/static/js/click_handlers.js+++ b/static/js/click_handlers.js@@ -24,7 +24,7 @@ import * as message_edit from "./message_edit";import * as message_flags from "./message_flags";import * as message_lists from "./message_lists";import * as message_store from "./message_store";-import * as muting_ui from "./muting_ui";+import * as muted_topics_ui from "./muted_topics_ui";import * as narrow from "./narrow";import * as notifications from "./notifications";import * as overlays from "./overlays";@@ -348,9 +348,9 @@ export function initialize() {const stream_id = Number.parseInt($elt.attr("data-stream-id"), 10);const topic = $elt.attr("data-topic-name");if (mute_topic) {- muting_ui.mute_topic(stream_id, topic);+ muted_topics_ui.mute_topic(stream_id, topic);} else {- muting_ui.unmute_topic(stream_id, topic);+ muted_topics_ui.unmute_topic(stream_id, topic);}}diff --git a/static/js/hotkey.js b/static/js/hotkey.jsindex 4a12934e1c3..f18e7cebc2e 100644--- a/static/js/hotkey.js+++ b/static/js/hotkey.js@@ -24,7 +24,7 @@ import * as message_edit from "./message_edit";import * as message_flags from "./message_flags";import * as message_lists from "./message_lists";import * as message_view_header from "./message_view_header";-import * as muting_ui from "./muting_ui";+import * as muted_topics_ui from "./muted_topics_ui";import * as narrow from "./narrow";import * as navigate from "./navigate";import * as overlays from "./overlays";@@ -883,7 +883,7 @@ export function process_hotkey(e, hotkey) {return true;}case "toggle_topic_mute":- muting_ui.toggle_topic_mute(msg);+ muted_topics_ui.toggle_topic_mute(msg);return true;case "toggle_message_collapse":condense.toggle_collapse(msg);diff --git a/static/js/muting_ui.js b/static/js/muted_topics_ui.jssimilarity index 100%rename from static/js/muting_ui.jsrename to static/js/muted_topics_ui.jsdiff --git a/static/js/popovers.js b/static/js/popovers.jsindex fb138be53c3..41940a239ce 100644--- a/static/js/popovers.js+++ b/static/js/popovers.js@@ -29,9 +29,9 @@ import * as message_edit_history from "./message_edit_history";import * as message_lists from "./message_lists";import * as message_viewport from "./message_viewport";import * as muted_topics from "./muted_topics";+import * as muted_topics_ui from "./muted_topics_ui";import * as muted_users from "./muted_users";import * as muted_users_ui from "./muted_users_ui";-import * as muting_ui from "./muting_ui";import * as narrow from "./narrow";import * as narrow_state from "./narrow_state";import * as overlays from "./overlays";@@ -1175,7 +1175,7 @@ export function register_click_handlers() {const topic = $(e.currentTarget).attr("data-msg-topic");hide_actions_popover();- muting_ui.mute_topic(stream_id, topic);+ muted_topics_ui.mute_topic(stream_id, topic);e.stopPropagation();e.preventDefault();});@@ -1185,7 +1185,7 @@ export function register_click_handlers() {const topic = $(e.currentTarget).attr("data-msg-topic");hide_actions_popover();- muting_ui.unmute_topic(stream_id, topic);+ muted_topics_ui.unmute_topic(stream_id, topic);e.stopPropagation();e.preventDefault();});diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.jsindex 1731a9b7b7f..ebee19d4cad 100644--- a/static/js/server_events_dispatch.js+++ b/static/js/server_events_dispatch.js@@ -20,8 +20,8 @@ import * as message_events from "./message_events";import * as message_flags from "./message_flags";import * as message_list from "./message_list";import * as message_lists from "./message_lists";+import * as muted_topics_ui from "./muted_topics_ui";import * as muted_users_ui from "./muted_users_ui";-import * as muting_ui from "./muting_ui";import * as narrow_state from "./narrow_state";import * as navbar_alerts from "./navbar_alerts";import * as night_mode from "./night_mode";@@ -135,7 +135,7 @@ export function dispatch_normal_event(event) {break;case "muted_topics":- muting_ui.handle_topic_updates(event.muted_topics);+ muted_topics_ui.handle_topic_updates(event.muted_topics);break;case "muted_users":diff --git a/static/js/settings_muted_topics.js b/static/js/settings_muted_topics.jsindex a1a94a2000c..f3b55de21c5 100644--- a/static/js/settings_muted_topics.js+++ b/static/js/settings_muted_topics.js@@ -4,7 +4,7 @@ import render_muted_topic_ui_row from "../templates/muted_topic_ui_row.hbs";import * as ListWidget from "./list_widget";import * as muted_topics from "./muted_topics";-import * as muting_ui from "./muting_ui";+import * as muted_topics_ui from "./muted_topics_ui";import * as ui from "./ui";export let loaded = false;@@ -42,7 +42,7 @@ export function set_up() {e.stopPropagation();- muting_ui.unmute_topic(stream_id, topic);+ muted_topics_ui.unmute_topic(stream_id, topic);});populate_list();diff --git a/static/js/stream_popover.js b/static/js/stream_popover.jsindex 13da30247bc..1114004cb82 100644--- a/static/js/stream_popover.js+++ b/static/js/stream_popover.js@@ -18,7 +18,7 @@ import * as hash_util from "./hash_util";import {$t, $t_html} from "./i18n";import * as message_edit from "./message_edit";import * as muted_topics from "./muted_topics";-import * as muting_ui from "./muting_ui";+import * as muted_topics_ui from "./muted_topics_ui";import * as overlays from "./overlays";import {page_params} from "./page_params";import * as popovers from "./popovers";@@ -618,7 +618,7 @@ export function register_topic_handlers() {}const topic = $(e.currentTarget).attr("data-topic-name");- muting_ui.mute_topic(stream_id, topic);+ muted_topics_ui.mute_topic(stream_id, topic);e.stopPropagation();e.preventDefault();});@@ -631,7 +631,7 @@ export function register_topic_handlers() {}const topic = $(e.currentTarget).attr("data-topic-name");- muting_ui.unmute_topic(stream_id, topic);+ muted_topics_ui.unmute_topic(stream_id, topic);e.stopPropagation();e.preventDefault();});diff --git a/tools/test-js-with-node b/tools/test-js-with-nodeindex b8ef334f49a..ab33f82e94d 100755--- a/tools/test-js-with-node+++ b/tools/test-js-with-node@@ -94,7 +94,7 @@ EXEMPT_FILES = {"static/js/message_scroll.js","static/js/message_util.js","static/js/message_viewport.js",- "static/js/muting_ui.js",+ "static/js/muted_topics_ui.js","static/js/muted_users_ui.js","static/js/narrow.js","static/js/navigate.js",