Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
resize: Rename reset_compose_textarea_max_height.
Aman Agrawala38b11d18872
diff --git a/frontend_tests/node_tests/compose.js b/frontend_tests/node_tests/compose.jsindex 8db48179323..8a21610660a 100644--- a/frontend_tests/node_tests/compose.js+++ b/frontend_tests/node_tests/compose.js@@ -749,9 +749,9 @@ test_ui("on_events", ({override, override_rewire}) => {})();(function test_markdown_preview_compose_clicked() {- let reset_compose_textarea_max_height_called = false;- override(resize, "reset_compose_textarea_max_height", () => {- reset_compose_textarea_max_height_called = true;+ let reset_compose_message_max_height_called = false;+ override(resize, "reset_compose_message_max_height", () => {+ reset_compose_message_max_height_called = true;});// Tests setup@@ -839,7 +839,7 @@ test_ui("on_events", ({override, override_rewire}) => {assert.equal($("#compose .preview_content").html(), "translated HTML: Nothing to preview");assert_visibilities();- assert.ok(reset_compose_textarea_max_height_called);+ assert.ok(reset_compose_message_max_height_called);let make_indicator_called = false;$("#compose-textarea").val("```foobarfoobar```");diff --git a/frontend_tests/node_tests/compose_actions.js b/frontend_tests/node_tests/compose_actions.jsindex c264534610d..975152b0c3a 100644--- a/frontend_tests/node_tests/compose_actions.js+++ b/frontend_tests/node_tests/compose_actions.js@@ -45,7 +45,7 @@ mock_esm("../../static/js/message_lists", {},});mock_esm("../../static/js/resize", {- reset_compose_textarea_max_height: noop,+ reset_compose_message_max_height: noop,});const people = zrequire("people");diff --git a/static/js/compose.js b/static/js/compose.jsindex 5e2928d4797..8a264b46e0c 100644--- a/static/js/compose.js+++ b/static/js/compose.js@@ -669,7 +669,7 @@ export function initialize() {$("#compose .preview_content"),content,);- resize.reset_compose_textarea_max_height();+ resize.reset_compose_message_max_height();});$("#compose").on("click", ".undo_markdown_preview", (e) => {diff --git a/static/js/compose_actions.js b/static/js/compose_actions.jsindex 02b0e1dea4d..187b446f4f7 100644--- a/static/js/compose_actions.js+++ b/static/js/compose_actions.js@@ -292,7 +292,7 @@ export function start(msg_type, opts) {// Reset the `max-height` property of `compose-textarea` so that the// compose-box do not cover the last messages of the current stream// while writing a long message.- resize.reset_compose_textarea_max_height();+ resize.reset_compose_message_max_height();complete_starting_tasks(msg_type, opts);}diff --git a/static/js/resize.js b/static/js/resize.jsindex 0dc3e9f0dc7..4aac25b2513 100644--- a/static/js/resize.js+++ b/static/js/resize.js@@ -159,7 +159,7 @@ export function watch_manual_resize(element) {return [box_handler, body_handler];}-export function reset_compose_textarea_max_height(bottom_whitespace_height) {+export function reset_compose_message_max_height(bottom_whitespace_height) {// If the compose-box is open, we set the `max-height` property of// `compose-textarea` and `preview-textarea`, so that the// compose-box's maximum extent does not overlap the last message@@ -194,11 +194,11 @@ export function resize_bottom_whitespace(h) {// The height of the compose box is tied to that of// bottom_whitespace, so update it if necessary.//- // reset_compose_textarea_max_height cannot compute the right+ // reset_compose_message_max_height cannot compute the right// height correctly while compose is hidden. This is OK, because// we also resize compose every time it is opened.if ($(".message_comp").is(":visible")) {- reset_compose_textarea_max_height(h.bottom_whitespace_height);+ reset_compose_message_max_height(h.bottom_whitespace_height);}}