Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compose: Add privacy icons to the stream dropdown menu.
evykassirer02ae5818aeb3
diff --git a/web/src/compose_actions.js b/web/src/compose_actions.jsindex ef8b3eeb59e..c1c0050ade6 100644--- a/web/src/compose_actions.js+++ b/web/src/compose_actions.js@@ -208,7 +208,7 @@ export function complete_starting_tasks(msg_type, opts) {maybe_scroll_up_selected_message();compose_fade.start_compose(msg_type);- stream_bar.decorate(opts.stream, $("#compose-stream-recipient .message_header_stream"), true);+ stream_bar.decorate(opts.stream, $("#compose-stream-recipient .message_header_stream"));$(document).trigger(new $.Event("compose_started.zulip", opts));update_placeholder_text();update_narrow_to_recipient_visibility();@@ -332,7 +332,7 @@ export function start(msg_type, opts) {const $stream_header_colorblock = $("#compose_stream_selection_dropdown").find(".stream_header_colorblock",);- stream_bar.decorate(opts.stream, $stream_header_colorblock, false);+ stream_bar.decorate(opts.stream, $stream_header_colorblock);// We set the stream/topic/private_message_recipient// unconditionally here, which assumes the caller will have passeddiff --git a/web/src/compose_ui.js b/web/src/compose_ui.jsindex 53221fd8c72..6b1d1d3a189 100644--- a/web/src/compose_ui.js+++ b/web/src/compose_ui.js@@ -516,7 +516,7 @@ export function on_compose_select_stream_update(new_value) {const $stream_header_colorblock = $("#compose_stream_selection_dropdown").find(".stream_header_colorblock",);- stream_bar.decorate(new_value, $stream_header_colorblock, true);+ stream_bar.decorate(new_value, $stream_header_colorblock);compose.update_on_recipient_change();$("#stream_message_recipient_topic").trigger("focus").trigger("select");}@@ -529,6 +529,7 @@ export function initialize_compose_stream_dropdown() {.map((stream) => ({name: stream.name,value: stream.name,+ stream,})).sort((a, b) => {if (a.name.toLowerCase() < b.name.toLowerCase()) {diff --git a/web/src/stream_bar.js b/web/src/stream_bar.jsindex 89c1235380e..92d747970e6 100644--- a/web/src/stream_bar.js+++ b/web/src/stream_bar.js@@ -1,37 +1,13 @@-import $ from "jquery";-import * as stream_data from "./stream_data";-function update_compose_stream_icon(stream_name) {- const $streamfield = $("#compose_select_stream_name");- const $globe_icon = $("#compose-globe-icon");- const $lock_icon = $("#compose-lock-icon");-- // Reset state- $globe_icon.hide();- $lock_icon.hide();- $streamfield.removeClass("lock-padding");-- if (stream_data.is_invite_only_by_stream_name(stream_name)) {- $lock_icon.show();- $streamfield.addClass("lock-padding");- } else if (stream_data.is_web_public_by_stream_name(stream_name)) {- $globe_icon.show();- $streamfield.addClass("lock-padding");- }-}-// In an attempt to decrease mixing, set stream bar// color look like the stream being used.// (In particular, if there's a color associated with it,// have that color be reflected here too.)-export function decorate(stream_name, $element, is_compose) {+export function decorate(stream_name, $element) {if (stream_name === undefined) {return;}const color = stream_data.get_color(stream_name);- if (is_compose) {- update_compose_stream_icon(stream_name);- }$element.css("background-color", color);}diff --git a/web/src/stream_popover.js b/web/src/stream_popover.jsindex 72b7c4b0b60..4718321d8ac 100644--- a/web/src/stream_popover.js+++ b/web/src/stream_popover.js@@ -360,7 +360,7 @@ export function build_move_topic_to_stream_popover($stream_header_colorblock = $("#dialog_widget_modal .topic_stream_edit_header").find(".stream_header_colorblock",);- stream_bar.decorate(current_stream_name, $stream_header_colorblock, false);+ stream_bar.decorate(current_stream_name, $stream_header_colorblock);const streams_list =message_edit.get_available_streams_for_moving_messages(current_stream_id);const opts = {@@ -418,7 +418,7 @@ export function register_click_handlers() {Number.parseInt(stream_widget.value(), 10),);- stream_bar.decorate(stream_name, $stream_header_colorblock, false);+ stream_bar.decorate(stream_name, $stream_header_colorblock);});register_stream_handlers();diff --git a/web/styles/compose.css b/web/styles/compose.cssindex 68a47baa126..8c7fa0e0424 100644--- a/web/styles/compose.css+++ b/web/styles/compose.css@@ -139,22 +139,6 @@font-weight: 600;}- #compose-lock-icon,- #compose-globe-icon {- position: relative;- left: 6px;- top: 0.5px;- width: 0;- }-- #compose-globe-icon {- left: 4.5px;-- .zulip-icon-globe {- font-size: 12px;- }- }-.message_header {background: none;background-color: hsl(0deg 0% 92%);@@ -801,7 +785,6 @@ a.compose_control_button.hide {.fa-chevron-down {float: right;- padding-bottom: 2px;padding-left: 5px;padding-bottom: 2px;color: hsl(0deg 0% 58%);