grid: Remove message content from document flow when editing.

This effectively reverts a change introduced in #26260 that used
the original message to maintain the basline grid. With more
robust control over first-row line-heights, it is now safe to
fullyl hide the message again.

This also fixes a regression where messages with images would have
additional whitespace beneath the message edit box; see
https://chat.zulip.org/#narrow/stream/6-frontend/topic/message.20edit.20form.20height/near/1621758
This commit is contained in:
Karl Stolley
2023-08-10 15:15:11 -05:00
committed by Tim Abbott
parent c25da457e5
commit 34928407cf

View File

@@ -382,11 +382,7 @@ export class MessageList {
return;
}
$row.find(".message_edit_form").append(edit_obj.$form);
// Hide the original message with visibility: hidden,
// so its baseline is still detectable on other columns
// in the grid for a consistent layout in the edit state
$row.find(".message_content").css("visibility", "hidden");
$row.find(".status-message, .message_controls").hide();
$row.find(".message_content, .status-message, .message_controls").hide();
$row.find(".sender-status").toggleClass("sender-status-edit");
$row.find(".messagebox-content").addClass("content_edit_mode");
$row.find(".message_edit").css("display", "block");
@@ -394,8 +390,7 @@ export class MessageList {
}
hide_edit_message($row) {
$row.find(".message_content").css("visibility", "visible");
$row.find(".status-message, .message_controls").show();
$row.find(".message_content, .status-message, .message_controls").show();
$row.find(".sender-status").toggleClass("sender-status-edit");
$row.find(".message_edit_form").empty();
$row.find(".messagebox-content").removeClass("content_edit_mode");