diff --git a/web/src/compose_actions.js b/web/src/compose_actions.js index cad56b37b0..ae95c06271 100644 --- a/web/src/compose_actions.js +++ b/web/src/compose_actions.js @@ -23,7 +23,6 @@ import * as resize from "./resize"; import * as settings_config from "./settings_config"; import * as spectators from "./spectators"; import {realm} from "./state_data"; -import * as stream_bar from "./stream_bar"; import * as stream_data from "./stream_data"; const compose_clear_box_hooks = []; @@ -115,12 +114,6 @@ export function complete_starting_tasks(msg_type, opts) { maybe_scroll_up_selected_message(opts); compose_fade.start_compose(msg_type); - if (msg_type === "stream") { - stream_bar.decorate( - opts.stream_id, - $("#stream_message_recipient_topic .message_header_stream"), - ); - } $(document).trigger(new $.Event("compose_started.zulip", opts)); compose_recipient.update_placeholder_text(); compose_recipient.update_narrow_to_recipient_visibility(); @@ -245,13 +238,6 @@ export function start(msg_type, opts) { clear_box(); } - if (msg_type === "stream") { - const $stream_header_colorblock = $( - "#compose_select_recipient_widget_wrapper .stream_header_colorblock", - ); - stream_bar.decorate(opts.stream_id, $stream_header_colorblock); - } - if (msg_type === "private") { compose_state.set_compose_recipient_id(compose_state.DIRECT_MESSAGE_ID); compose_recipient.on_compose_select_recipient_update(); diff --git a/web/src/compose_recipient.js b/web/src/compose_recipient.js index efc2f31422..1a35c76fc9 100644 --- a/web/src/compose_recipient.js +++ b/web/src/compose_recipient.js @@ -18,7 +18,6 @@ import * as narrow_state from "./narrow_state"; import * as people from "./people"; import * as settings_config from "./settings_config"; import {realm} from "./state_data"; -import * as stream_bar from "./stream_bar"; import * as stream_data from "./stream_data"; import * as sub_store from "./sub_store"; import * as ui_util from "./ui_util"; @@ -207,12 +206,8 @@ export function on_compose_select_recipient_update() { if (curr_message_type === "stream") { // Update stream name in the recipient box. - const $stream_header_colorblock = $( - "#compose_select_recipient_widget_wrapper .stream_header_colorblock", - ); const stream_id = compose_state.stream_id(); update_recipient_label(stream_id); - stream_bar.decorate(stream_id, $stream_header_colorblock); } update_on_recipient_change(); diff --git a/web/src/stream_bar.ts b/web/src/stream_bar.ts deleted file mode 100644 index b9b7499ca1..0000000000 --- a/web/src/stream_bar.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as stream_data from "./stream_data"; - -// 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_id: number | undefined, $element: JQuery): void { - const color = stream_data.get_color(stream_id); - $element.css("background-color", color); -} diff --git a/web/src/stream_popover.js b/web/src/stream_popover.js index a8d7cf2abc..720bdb8a4e 100644 --- a/web/src/stream_popover.js +++ b/web/src/stream_popover.js @@ -18,7 +18,6 @@ import * as message_lists from "./message_lists"; import * as popover_menus from "./popover_menus"; import {left_sidebar_tippy_options} from "./popover_menus"; import * as settings_data from "./settings_data"; -import * as stream_bar from "./stream_bar"; import * as stream_color from "./stream_color"; import * as stream_data from "./stream_data"; import * as stream_settings_api from "./stream_settings_api"; @@ -33,7 +32,6 @@ import * as util from "./util"; // that pop up from the left sidebar. let stream_popover_instance = null; let stream_widget_value; -let $stream_header_colorblock; function get_popover_menu_items(sidebar_elem) { if (!sidebar_elem) { @@ -486,7 +484,6 @@ export async function build_move_topic_to_stream_popover( function render_selected_stream() { const stream_id = Number.parseInt(stream_widget_value, 10); - stream_bar.decorate(stream_id, $stream_header_colorblock); const stream = stream_data.get_sub_by_id(stream_id); if (stream === undefined) { $("#move_topic_to_stream_widget .dropdown_widget_value").text( @@ -531,9 +528,6 @@ export async function build_move_topic_to_stream_popover( return; } - $stream_header_colorblock = $("#dialog_widget_modal .topic_stream_edit_header").find( - ".stream_header_colorblock", - ); stream_widget_value = current_stream_id; const streams_list_options = () => stream_data.get_options_for_dropdown_widget().filter((stream) => { @@ -557,9 +551,6 @@ export async function build_move_topic_to_stream_popover( render_selected_stream(); $("#move_topic_to_stream_widget").prop("disabled", disable_stream_input); - if (disable_stream_input) { - $stream_header_colorblock.addClass("disabled"); - } $("#move_topic_modal .move_messages_edit_topic").on("input", () => { update_submit_button_disabled_state(stream_widget_value); }); diff --git a/web/styles/app_components.css b/web/styles/app_components.css index 6ffbff4589..ceca361a3b 100644 --- a/web/styles/app_components.css +++ b/web/styles/app_components.css @@ -484,12 +484,6 @@ div.overlay { border-bottom: 0; } -.stream_header_colorblock { - @extend .stream-selection-header-colorblock; - margin-bottom: 5px; - z-index: 1; -} - .edit-controls .fa-angle-right, .topic_stream_edit_header .fa-angle-right { font-size: 0.9em; diff --git a/web/styles/compose.css b/web/styles/compose.css index 730f18a1ee..de25b695a9 100644 --- a/web/styles/compose.css +++ b/web/styles/compose.css @@ -163,10 +163,6 @@ #compose_select_recipient_widget { border-radius: 4px !important; } - - .stream_header_colorblock { - display: none; - } } .topic-marker-container { @@ -828,12 +824,12 @@ textarea.new_message_textarea, } #compose_select_recipient_widget { - border-radius: 0 4px 4px 0; width: auto; outline: none; &.dropdown-widget-button { padding: 0 6px; + border-radius: 4px; } } @@ -1163,13 +1159,8 @@ textarea.new_message_textarea, justify-content: flex-start; height: var(--compose-recipient-box-min-height); - .stream_header_colorblock { - margin: 0; - } - .dropdown_widget_value { flex-grow: 1; - overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-default); diff --git a/web/styles/message_row.css b/web/styles/message_row.css index b6223028d3..d5492a1b19 100644 --- a/web/styles/message_row.css +++ b/web/styles/message_row.css @@ -605,10 +605,6 @@ $time_column_min_width: 42px; /* + padding */ margin-top: 0; } - .stream_header_colorblock { - margin-bottom: 10px; - } - & textarea { width: 100%; min-width: 206px; diff --git a/web/styles/popovers.css b/web/styles/popovers.css index 9d99dbe928..e03ba6e515 100644 --- a/web/styles/popovers.css +++ b/web/styles/popovers.css @@ -1026,19 +1026,12 @@ ul { margin-bottom: 10px; .dropdown-widget-button { - /* Override the default border-radius to properly align - the button corners with `stream_header_colorblock`. */ - border-radius: 1px 4px 4px 1px !important; outline: none; line-height: 24px; width: auto; max-width: 206px; } - .stream_header_colorblock { - margin: 0; - } - .dropdown_widget_value { overflow: hidden; text-overflow: ellipsis; diff --git a/web/templates/compose.hbs b/web/templates/compose.hbs index 90c292ac2a..2a7a9e4090 100644 --- a/web/templates/compose.hbs +++ b/web/templates/compose.hbs @@ -58,7 +58,7 @@
- {{> dropdown_widget_with_stream_colorblock + {{> dropdown_widget_wrapper widget_name="compose_select_recipient"}}