From b34d46e00b72d54abd38fa90bc4d01a1c05198e0 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Sat, 4 Jul 2020 19:55:41 +0530 Subject: [PATCH] css: Rename #home id to #message_feed_container. --- frontend_tests/node_tests/hashchange.js | 8 ++++---- static/js/click_handlers.js | 6 +++--- static/js/compose_actions.js | 2 +- static/js/condense.js | 4 ++-- static/js/gear_menu.js | 4 ++-- static/js/hashchange.js | 4 ++-- static/js/message_scroll.js | 2 +- static/js/narrow.js | 2 +- static/js/search.js | 2 +- static/styles/zulip.scss | 2 +- templates/zerver/app/index.html | 2 +- templates/zerver/app/navbar.html | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/frontend_tests/node_tests/hashchange.js b/frontend_tests/node_tests/hashchange.js index e6143d7755..36987c07ea 100644 --- a/frontend_tests/node_tests/hashchange.js +++ b/frontend_tests/node_tests/hashchange.js @@ -159,7 +159,7 @@ run_test("hash_interactions", () => { helper.assert_events([ "overlays.close_for_hash_change", "message_viewport.stop_auto_scrolling", - "change_tab_to #home", + "change_tab_to #message_feed_container", "narrow.deactivate", "floating_recipient_bar.update", ]); @@ -169,7 +169,7 @@ run_test("hash_interactions", () => { helper.assert_events([ "overlays.close_for_hash_change", "message_viewport.stop_auto_scrolling", - "change_tab_to #home", + "change_tab_to #message_feed_container", "narrow.deactivate", "floating_recipient_bar.update", ]); @@ -181,7 +181,7 @@ run_test("hash_interactions", () => { helper.assert_events([ "overlays.close_for_hash_change", "message_viewport.stop_auto_scrolling", - "change_tab_to #home", + "change_tab_to #message_feed_container", "narrow.activate", "floating_recipient_bar.update", ]); @@ -195,7 +195,7 @@ run_test("hash_interactions", () => { helper.assert_events([ "overlays.close_for_hash_change", "message_viewport.stop_auto_scrolling", - "change_tab_to #home", + "change_tab_to #message_feed_container", "narrow.activate", "floating_recipient_bar.update", ]); diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 6f93963edf..789c30390a 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -269,7 +269,7 @@ exports.initialize = function () { $("body").on("click", ".notification", function () { const payload = $(this).data("narrow"); - ui_util.change_tab_to("#home"); + ui_util.change_tab_to("#message_feed_container"); narrow.activate(payload.raw_operators, payload.opts_notif); }); @@ -452,7 +452,7 @@ exports.initialize = function () { return nearest.id; } - $("#home").on("click", ".narrows_by_recipient", function (e) { + $("#message_feed_container").on("click", ".narrows_by_recipient", function (e) { if (e.metaKey || e.ctrlKey) { return; } @@ -461,7 +461,7 @@ exports.initialize = function () { narrow.by_recipient(row_id, {trigger: "message header"}); }); - $("#home").on("click", ".narrows_by_topic", function (e) { + $("#message_feed_container").on("click", ".narrows_by_topic", function (e) { if (e.metaKey || e.ctrlKey) { return; } diff --git a/static/js/compose_actions.js b/static/js/compose_actions.js index 429f51f0a2..84d41da982 100644 --- a/static/js/compose_actions.js +++ b/static/js/compose_actions.js @@ -112,7 +112,7 @@ exports.complete_starting_tasks = function (msg_type, opts) { // makes testing a bit easier. exports.maybe_scroll_up_selected_message(); - ui_util.change_tab_to("#home"); + ui_util.change_tab_to("#message_feed_container"); compose_fade.start_compose(msg_type); ui_util.decorate_stream_bar(opts.stream, $("#stream-message .message_header_stream"), true); $(document).trigger($.Event("compose_started.zulip", opts)); diff --git a/static/js/condense.js b/static/js/condense.js index 3a216ed2b3..929213acfe 100644 --- a/static/js/condense.js +++ b/static/js/condense.js @@ -234,7 +234,7 @@ exports.condense_and_collapse = function (elems) { }; exports.initialize = function () { - $("#home").on("click", ".message_expander", function (e) { + $("#message_feed_container").on("click", ".message_expander", function (e) { // Expanding a message can mean either uncollapsing or // uncondensing it. const row = $(this).closest(".message_row"); @@ -254,7 +254,7 @@ exports.initialize = function () { e.preventDefault(); }); - $("#home").on("click", ".message_condenser", function (e) { + $("#message_feed_container").on("click", ".message_condenser", function (e) { const row = $(this).closest(".message_row"); current_msg_list.get(rows.id(row)).condensed = true; condense_row(row); diff --git a/static/js/gear_menu.js b/static/js/gear_menu.js index 86b3a7dd51..bd812337de 100644 --- a/static/js/gear_menu.js +++ b/static/js/gear_menu.js @@ -98,7 +98,7 @@ exports.initialize = function () { // Set the URL bar title to show the sub-page you're currently on. let browser_url = target_tab; - if (browser_url === "#home") { + if (browser_url === "#message_feed_container") { browser_url = ""; } hashchange.changehash(browser_url); @@ -106,7 +106,7 @@ exports.initialize = function () { // After we show the new tab, restore its old scroll position // (we apparently have to do this after setting the hash, // because otherwise that action may scroll us somewhere.) - if (target_tab === "#home") { + if (target_tab === "#message_feed_container") { if (scroll_positions.has(target_tab)) { message_viewport.scrollTop(scroll_positions.get(target_tab)); } else { diff --git a/static/js/hashchange.js b/static/js/hashchange.js index 4cbab8c4ff..728aba659b 100644 --- a/static/js/hashchange.js +++ b/static/js/hashchange.js @@ -49,7 +49,7 @@ exports.save_narrow = function (operators) { }; function activate_home_tab() { - ui_util.change_tab_to("#home"); + ui_util.change_tab_to("#message_feed_container"); narrow.deactivate(); floating_recipient_bar.update(); search.update_button_visibility(); @@ -92,7 +92,7 @@ function do_hashchange_normal(from_reload) { const hash = window.location.hash.split("/"); switch (hash[0]) { case "#narrow": { - ui_util.change_tab_to("#home"); + ui_util.change_tab_to("#message_feed_container"); const operators = hash_util.parse_narrow(hash); if (operators === undefined) { // If the narrow URL didn't parse, clear diff --git a/static/js/message_scroll.js b/static/js/message_scroll.js index e929c7d565..2aff03015b 100644 --- a/static/js/message_scroll.js +++ b/static/js/message_scroll.js @@ -115,7 +115,7 @@ exports.actively_scrolling = function () { exports.scroll_finished = function () { actively_scrolling = false; - if (!$("#home").hasClass("active")) { + if (!$("#message_feed_container").hasClass("active")) { return; } diff --git a/static/js/narrow.js b/static/js/narrow.js index b4788b0f51..f727ac9d92 100644 --- a/static/js/narrow.js +++ b/static/js/narrow.js @@ -261,7 +261,7 @@ exports.activate = function (raw_operators, opts) { $("#zfilt").addClass("focused_table"); $("#zhome").removeClass("focused_table"); - ui_util.change_tab_to("#home"); + ui_util.change_tab_to("#message_feed_container"); message_list.set_narrowed(msg_list); current_msg_list = message_list.narrowed; diff --git a/static/js/search.js b/static/js/search.js index 8599b65b16..7d6fc1e1b3 100644 --- a/static/js/search.js +++ b/static/js/search.js @@ -9,7 +9,7 @@ exports.narrow_or_search_for_term = function (search_string) { // while using input tool return search_query_box.val(); } - ui_util.change_tab_to("#home"); + ui_util.change_tab_to("#message_feed_container"); let operators; if (page_params.search_pills_enabled) { diff --git a/static/styles/zulip.scss b/static/styles/zulip.scss index f476317f4d..bdd218489f 100644 --- a/static/styles/zulip.scss +++ b/static/styles/zulip.scss @@ -2399,7 +2399,7 @@ div.topic_edit_spinner .loading_indicator_spinner { margin-left: -15px; } -#home { +#message_feed_container { margin-top: 41px; } diff --git a/templates/zerver/app/index.html b/templates/zerver/app/index.html index 2ec0ec17fb..de2a713778 100644 --- a/templates/zerver/app/index.html +++ b/templates/zerver/app/index.html @@ -94,7 +94,7 @@
-
+
diff --git a/templates/zerver/app/navbar.html b/templates/zerver/app/navbar.html index da6a7e0448..6da53f450d 100644 --- a/templates/zerver/app/navbar.html +++ b/templates/zerver/app/navbar.html @@ -59,7 +59,7 @@ view is a Bootstrap Nav tab, even though we don't show the tab anymore #} - +
  • {{ _('Manage streams') }}