From 9239de408a517dbabc507020024111bedee40dbd Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 11 May 2021 12:49:02 -0700 Subject: [PATCH] compose: Remove now unused nonexistent_stream_reply_error. This was a holdover from the legacy "reply" button behavior; with the new wide button model, it just becomes a normal "compose" button. --- frontend_tests/node_tests/compose.js | 16 ---------------- static/js/click_handlers.js | 3 --- static/js/compose.js | 8 -------- static/styles/compose.css | 7 ------- static/templates/compose.hbs | 4 ---- 5 files changed, 38 deletions(-) diff --git a/frontend_tests/node_tests/compose.js b/frontend_tests/node_tests/compose.js index d33f2a19ba..4068ec8b3b 100644 --- a/frontend_tests/node_tests/compose.js +++ b/frontend_tests/node_tests/compose.js @@ -1764,22 +1764,6 @@ test_ui("create_message_object", (override) => { people.email_list_to_user_ids_string = email_list_to_user_ids_string; }); -test_ui("nonexistent_stream_reply_error", () => { - reset_jquery(); - - const actions = []; - $("#nonexistent_stream_reply_error").show = () => { - actions.push("show"); - }; - $("#nonexistent_stream_reply_error").hide = () => { - actions.push("hide"); - }; - - compose.nonexistent_stream_reply_error(); - assert.equal($("#compose-reply-error-msg").html(), "There are no messages to reply to yet."); - assert.deepEqual(actions, ["show", "hide"]); -}); - test_ui("narrow_button_titles", () => { util.is_mobile = () => false; diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index b5c455d064..85f49ce1da 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -641,9 +641,6 @@ export function initialize() { $("body").on("click", "#compose-send-status .compose-send-status-close", () => { $("#compose-send-status").stop(true).fadeOut(500); }); - $("body").on("click", "#nonexistent_stream_reply_error .compose-send-status-close", () => { - $("#nonexistent_stream_reply_error").stop(true).fadeOut(500); - }); $("body").on("click", ".empty_feed_compose_stream", (e) => { compose_actions.start("stream", {trigger: "empty feed message"}); diff --git a/static/js/compose.js b/static/js/compose.js index 7b404f8c12..9d191e30be 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -305,14 +305,6 @@ export function compose_error(error_html, bad_input) { } } -export function nonexistent_stream_reply_error() { - $("#nonexistent_stream_reply_error").show(); - $("#compose-reply-error-msg").html("There are no messages to reply to yet."); - setTimeout(() => { - $("#nonexistent_stream_reply_error").hide(); - }, 5000); -} - function compose_not_subscribed_error(error_html, bad_input) { $("#compose-send-status") .removeClass(common.status_classes) diff --git a/static/styles/compose.css b/static/styles/compose.css index 9586167713..5bb2295e87 100644 --- a/static/styles/compose.css +++ b/static/styles/compose.css @@ -254,13 +254,6 @@ div[id^="message-edit-send-status"], margin-bottom: 10px; } -#nonexistent_stream_reply_error { - padding: 8px 14px 8px 14px; - margin-bottom: 8px; - line-height: 20px; - display: none; -} - /* Like .alert .close */ .send-status-close, .compose-send-status-close { diff --git a/static/templates/compose.hbs b/static/templates/compose.hbs index 10ac827d4e..52ad95b3f7 100644 --- a/static/templates/compose.hbs +++ b/static/templates/compose.hbs @@ -1,9 +1,5 @@
-
- × - -