diff --git a/web/e2e-tests/drafts.test.ts b/web/e2e-tests/drafts.test.ts index ff901f547c..974fe43807 100644 --- a/web/e2e-tests/drafts.test.ts +++ b/web/e2e-tests/drafts.test.ts @@ -54,9 +54,9 @@ async function create_private_message_draft(page: Page): Promise { } async function open_compose_markdown_preview(page: Page): Promise { - const new_topic_button = "#left_bar_compose_stream_button_big"; - await page.waitForSelector(new_topic_button, {visible: true}); - await page.click(new_topic_button); + const new_conversation_button = "#new_conversation_button"; + await page.waitForSelector(new_conversation_button, {visible: true}); + await page.click(new_conversation_button); const markdown_preview_button = "#compose .markdown_preview"; // eye icon. await page.waitForSelector(markdown_preview_button, {visible: true}); diff --git a/web/e2e-tests/message-basics.test.ts b/web/e2e-tests/message-basics.test.ts index ab6186eb50..9a371561b6 100644 --- a/web/e2e-tests/message-basics.test.ts +++ b/web/e2e-tests/message-basics.test.ts @@ -41,8 +41,8 @@ async function expect_verona_stream_test_topic(page: Page): Promise { ["Verona > test", ["verona test a", "verona test b", "verona test d"]], ]); assert.strictEqual( - await common.get_text_from_selector(page, "#left_bar_compose_stream_button_big"), - "New topic", + await common.get_text_from_selector(page, "#new_conversation_button"), + "Start new conversation", ); } @@ -274,8 +274,8 @@ async function expect_all_direct_messages(page: Page): Promise { ["You and Cordelia, Lear's daughter", ["direct message e"]], ]); assert.strictEqual( - await common.get_text_from_selector(page, "#left_bar_compose_stream_button_big"), - "New stream message", + await common.get_text_from_selector(page, "#new_conversation_button"), + "Start new conversation", ); assert.strictEqual(await page.title(), "All direct messages - Zulip Dev - Zulip"); } diff --git a/web/src/compose_closed_ui.js b/web/src/compose_closed_ui.js index 8324aa4a39..606fa00cf1 100644 --- a/web/src/compose_closed_ui.js +++ b/web/src/compose_closed_ui.js @@ -81,8 +81,8 @@ function update_reply_button_state(disable = false) { } } -function update_stream_button(btn_text) { - $("#left_bar_compose_stream_button_big").text(btn_text); +function update_new_conversation_button(btn_text) { + $("#new_conversation_button").text(btn_text); } function update_conversation_button(btn_text) { @@ -91,18 +91,18 @@ function update_conversation_button(btn_text) { function update_buttons(text_stream, disable_reply) { const text_conversation = $t({defaultMessage: "New direct message"}); - update_stream_button(text_stream); + update_new_conversation_button(text_stream); update_conversation_button(text_conversation); update_reply_button_state(disable_reply); } export function update_buttons_for_private() { - const text_stream = $t({defaultMessage: "New stream message"}); + const text_stream = $t({defaultMessage: "Start new conversation"}); if ( !narrow_state.pm_ids_string() || people.user_can_direct_message(narrow_state.pm_ids_string()) ) { - $("#left_bar_compose_stream_button_big").attr( + $("#new_conversation_button").attr( "data-tooltip-template-id", "new_stream_message_button_tooltip_template", ); @@ -120,8 +120,8 @@ export function update_buttons_for_private() { } export function update_buttons_for_stream() { - const text_stream = $t({defaultMessage: "New topic"}); - $("#left_bar_compose_stream_button_big").attr( + const text_stream = $t({defaultMessage: "Start new conversation"}); + $("#new_conversation_button").attr( "data-tooltip-template-id", "new_topic_message_button_tooltip_template", ); @@ -129,8 +129,8 @@ export function update_buttons_for_stream() { } export function update_buttons_for_recent_view() { - const text_stream = $t({defaultMessage: "New stream message"}); - $("#left_bar_compose_stream_button_big").attr( + const text_stream = $t({defaultMessage: "Start new conversation"}); + $("#new_conversation_button").attr( "data-tooltip-template-id", "new_stream_message_button_tooltip_template", ); @@ -168,7 +168,7 @@ export function initialize() { }); // Click handlers for buttons in the compose box. - $("body").on("click", ".compose_stream_button", () => { + $("body").on("click", ".compose_new_conversation_button", () => { compose_actions.start("stream", {trigger: "clear topic button"}); }); diff --git a/web/src/compose_tooltips.js b/web/src/compose_tooltips.js index d15fe9ad26..962d50eb1c 100644 --- a/web/src/compose_tooltips.js +++ b/web/src/compose_tooltips.js @@ -19,7 +19,7 @@ export function initialize() { // reply button's actual area is its containing span. "#compose_buttons > .reply_button_container", "#left_bar_compose_mobile_button_big", - "#left_bar_compose_stream_button_big", + "#new_conversation_button", "#left_bar_compose_private_button_big", ], delay: EXTRA_LONG_HOVER_DELAY, diff --git a/web/src/compose_ui.js b/web/src/compose_ui.js index 95d825ddc1..62c43a253b 100644 --- a/web/src/compose_ui.js +++ b/web/src/compose_ui.js @@ -44,7 +44,8 @@ export function insert_and_scroll_into_view(content, $textarea) { } function get_focus_area(msg_type, opts) { - // Set focus to "Topic" when narrowed to a stream+topic and "New topic" button clicked. + // Set focus to "Topic" when narrowed to a stream+topic + // and "Start new conversation" button clicked. if (msg_type === "stream" && opts.stream_id && !opts.topic) { return "#stream_message_recipient_topic"; } else if ( diff --git a/web/src/hotspots.js b/web/src/hotspots.js index 6e48c19987..5addf87d75 100644 --- a/web/src/hotspots.js +++ b/web/src/hotspots.js @@ -50,7 +50,7 @@ const HOTSPOT_LOCATIONS = new Map([ [ "intro_compose", { - element: "#left_bar_compose_stream_button_big", + element: "#new_conversation_button", offset_x: 0, offset_y: 0, }, diff --git a/web/styles/compose.css b/web/styles/compose.css index d686c47e8e..ccfcccc4a0 100644 --- a/web/styles/compose.css +++ b/web/styles/compose.css @@ -42,7 +42,7 @@ } } - .stream_button_container, + .new_conversation_button_container, .private_button_container { @media (width < $sm_min) { display: none; diff --git a/web/templates/compose.hbs b/web/templates/compose.hbs index b0ac4a1755..9b3a685e90 100644 --- a/web/templates/compose.hbs +++ b/web/templates/compose.hbs @@ -25,11 +25,11 @@ + - - {{#unless embedded }} diff --git a/web/tests/compose.test.js b/web/tests/compose.test.js index 0195f2a679..966914d4b1 100644 --- a/web/tests/compose.test.js +++ b/web/tests/compose.test.js @@ -776,8 +776,8 @@ test_ui("narrow_button_titles", ({override}) => { override(narrow_state, "is_message_feed_visible", () => true); compose_closed_ui.update_buttons_for_private(); assert.equal( - $("#left_bar_compose_stream_button_big").text(), - $t({defaultMessage: "New stream message"}), + $("#new_conversation_button").text(), + $t({defaultMessage: "Start new conversation"}), ); assert.equal( $("#left_bar_compose_private_button_big").text(), @@ -786,8 +786,8 @@ test_ui("narrow_button_titles", ({override}) => { compose_closed_ui.update_buttons_for_stream(); assert.equal( - $("#left_bar_compose_stream_button_big").text(), - $t({defaultMessage: "New topic"}), + $("#new_conversation_button").text(), + $t({defaultMessage: "Start new conversation"}), ); assert.equal( $("#left_bar_compose_private_button_big").text(),