From 99ea5f4e3212086a6a4fa976017c059a73e7bfb5 Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Wed, 6 Mar 2019 13:01:37 -0800 Subject: [PATCH] popovers: Remove a few entries from stream popover. These options are pretty low-value, since clicking the stream does the narrow, and it's likely that almost nobody sends messages via these buttons. --- static/js/compose_actions.js | 9 ++++----- static/js/stream_popover.js | 17 ----------------- .../templates/stream_sidebar_actions.handlebars | 12 ------------ 3 files changed, 4 insertions(+), 34 deletions(-) diff --git a/static/js/compose_actions.js b/static/js/compose_actions.js index 0749345b8d..bb8a2edaef 100644 --- a/static/js/compose_actions.js +++ b/static/js/compose_actions.js @@ -204,12 +204,11 @@ exports.start = function (msg_type, opts) { exports.expand_compose_box(); opts = fill_in_opts_from_current_narrowed_view(msg_type, opts); - // If we are invoked by a compose hotkey (c or x) or new topic button - // or sidebar stream actions (in stream popover), do not assume that we know what - // the message's topic or PM recipient should be. + // If we are invoked by a compose hotkey (c or x) or new topic + // button, do not assume that we know what the message's topic or + // PM recipient should be. if (opts.trigger === "compose_hotkey" || - opts.trigger === "new topic button" || - opts.trigger === "sidebar stream actions") { + opts.trigger === "new topic button") { opts.topic = ''; opts.private_message_recipient = ''; } diff --git a/static/js/stream_popover.js b/static/js/stream_popover.js index 12dbdc1b5d..52ba2073b4 100644 --- a/static/js/stream_popover.js +++ b/static/js/stream_popover.js @@ -238,15 +238,6 @@ exports.register_stream_handlers = function () { hashchange.go_to_location(stream_edit_hash); }); - // Narrow to stream - $('body').on('click', '.narrow_to_stream', function (e) { - var sub = stream_popover_sub(e); - exports.hide_stream_popover(); - narrow.by('stream', sub.name, {trigger: 'sidebar popover'} - ); - e.stopPropagation(); - }); - // Pin/unpin $('body').on('click', '.pin_to_top', function (e) { var sub = stream_popover_sub(e); @@ -255,14 +246,6 @@ exports.register_stream_handlers = function () { e.stopPropagation(); }); - // Compose a message to stream - $('body').on('click', '.compose_to_stream', function (e) { - var sub = stream_popover_sub(e); - exports.hide_stream_popover(); - compose_actions.start('stream', {stream: sub.name, trigger: 'sidebar stream actions'}); - e.stopPropagation(); - }); - // Mark all messages in stream as read $('body').on('click', '.mark_stream_as_read', function (e) { var sub = stream_popover_sub(e); diff --git a/static/templates/stream_sidebar_actions.handlebars b/static/templates/stream_sidebar_actions.handlebars index cf36eee93e..b00264bdbb 100644 --- a/static/templates/stream_sidebar_actions.handlebars +++ b/static/templates/stream_sidebar_actions.handlebars @@ -6,12 +6,6 @@ {{t "Stream settings" }} -
  • - - - {{#tr this}}Narrow to stream __stream.name__{{/tr}} - -
  • @@ -22,12 +16,6 @@ {{/if}}
  • -
  • - - - {{#tr this}}Compose a message to stream __stream.name__{{/tr}} - -