Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
left_sidebar: Move all messages popover to inbox.
Aman Agrawal2ec8273c6ecc
diff --git a/web/src/left_sidebar_navigation_area_popovers.js b/web/src/left_sidebar_navigation_area_popovers.jsindex 7cbdbbcb065..9696aa29b23 100644--- a/web/src/left_sidebar_navigation_area_popovers.js+++ b/web/src/left_sidebar_navigation_area_popovers.js@@ -1,7 +1,7 @@import $ from "jquery";-import render_all_messages_sidebar_actions from "../templates/all_messages_sidebar_actions.hbs";import render_drafts_sidebar_actions from "../templates/drafts_sidebar_action.hbs";+import render_left_sidebar_inbox_popover from "../templates/left_sidebar_inbox_popover.hbs";import render_starred_messages_sidebar_actions from "../templates/starred_messages_sidebar_actions.hbs";import * as channel from "./channel";@@ -81,12 +81,12 @@ export function initialize() {},});- // All messages popover- popover_menus.register_popover_menu(".all-messages-sidebar-menu-icon", {+ // Inbox popover+ popover_menus.register_popover_menu(".inbox-sidebar-menu-icon", {...popover_menus.left_sidebar_tippy_options,onMount(instance) {const $popper = $(instance.popper);- popover_menus.popover_instances.all_messages = instance;+ popover_menus.popover_instances.left_sidebar_inbox_popover = instance;$popper.one("click", "#mark_all_messages_as_read", () => {unread_ops.confirm_mark_all_as_read();@@ -95,11 +95,11 @@ export function initialize() {},onShow(instance) {popovers.hide_all();- instance.setContent(parse_html(render_all_messages_sidebar_actions()));+ instance.setContent(parse_html(render_left_sidebar_inbox_popover()));},onHidden(instance) {instance.destroy();- popover_menus.popover_instances.all_messages = undefined;+ popover_menus.popover_instances.left_sidebar_inbox_popover = undefined;},});}diff --git a/web/src/popover_menus.js b/web/src/popover_menus.jsindex f00a35c45c9..3701c0e1c3d 100644--- a/web/src/popover_menus.js+++ b/web/src/popover_menus.js@@ -24,7 +24,7 @@ export const popover_instances = {compose_control_buttons: null,starred_messages: null,drafts: null,- all_messages: null,+ left_sidebar_inbox_popover: null,message_actions: null,stream_settings: null,compose_mobile_button: null,diff --git a/web/templates/left_sidebar.hbs b/web/templates/left_sidebar.hbsindex 04a7c00f6e8..b19ec7e0620 100644--- a/web/templates/left_sidebar.hbs+++ b/web/templates/left_sidebar.hbs@@ -10,6 +10,7 @@<span class="global-filter-name">{{t 'Inbox' }}</span><span class="unread_count"></span></a>+ <span class="arrow sidebar-menu-icon inbox-sidebar-menu-icon hidden-for-spectators"><i class="zulip-icon zulip-icon-more-vertical" aria-hidden="true"></i></span></li><li class="top_left_recent_view top_left_row"><a href="#recent" class="tippy-left-sidebar-tooltip global-filter-container" data-tooltip-template-id="recent-conversations-tooltip-template">@@ -28,7 +29,6 @@{{~!-- squash whitespace --~}}<span class="global-filter-name">{{t 'All messages' }}</span></a>- <span class="arrow sidebar-menu-icon all-messages-sidebar-menu-icon hidden-for-spectators"><i class="zulip-icon zulip-icon-more-vertical" aria-hidden="true"></i></span></li><li class="top_left_mentions top_left_row hidden-for-spectators"><a class="global-filter-container" href="#narrow/is/mentioned">diff --git a/web/templates/all_messages_sidebar_actions.hbs b/web/templates/left_sidebar_inbox_popover.hbssimilarity index 100%rename from web/templates/all_messages_sidebar_actions.hbsrename to web/templates/left_sidebar_inbox_popover.hbsdiff --git a/web/tests/left_sidebar_navigation_area.test.js b/web/tests/left_sidebar_navigation_area.test.jsindex 175f4c39e1b..91e17636bbf 100644--- a/web/tests/left_sidebar_navigation_area.test.js+++ b/web/tests/left_sidebar_navigation_area.test.js@@ -78,7 +78,7 @@ run_test("update_count_in_dom", () => {make_elem($(".top_left_mentions"), "<mentioned-count>");- make_elem($(".top_left_all_messages"), "<home-count>");+ make_elem($(".top_left_inbox"), "<home-count>");make_elem($(".top_left_starred_messages"), "<starred-count>");