From 44ada5218512de81c0539eb9e28f379b65bc7862 Mon Sep 17 00:00:00 2001 From: Mikayla Date: Thu, 5 Oct 2023 11:06:29 -0700 Subject: [PATCH] Fix bug where chat text wouldn't wrap to width --- crates/collab_ui/src/chat_panel.rs | 23 ++++++++++------------- crates/collab_ui/src/collab_panel.rs | 6 +----- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/crates/collab_ui/src/chat_panel.rs b/crates/collab_ui/src/chat_panel.rs index 0dbcde31ed..d85c3ce934 100644 --- a/crates/collab_ui/src/chat_panel.rs +++ b/crates/collab_ui/src/chat_panel.rs @@ -398,12 +398,16 @@ impl ChatPanel { if is_continuation { Flex::row() - .with_child(MarkdownElement::new( - markdown.clone(), - style.body.clone(), - theme.editor.syntax.clone(), - theme.editor.document_highlight_read_background, - )) + .with_child( + Flex::column() + .with_child(MarkdownElement::new( + markdown.clone(), + style.body.clone(), + theme.editor.syntax.clone(), + theme.editor.document_highlight_read_background, + )) + .flex(1., true), + ) .with_children(message_id_to_remove.map(|id| { MouseEventHandler::new::(id as usize, cx, |mouse_state, _| { let button_style = theme.chat_panel.icon_button.style_for(mouse_state); @@ -418,13 +422,6 @@ impl ChatPanel { }) .flex_float() })) - .contained() - .with_style(style.container) - .with_margin_bottom(if is_last { - theme.chat_panel.last_message_bottom_spacing - } else { - 0. - }) .into_any() } else { Flex::column() diff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rs index 66913c2da7..951c8bf70c 100644 --- a/crates/collab_ui/src/collab_panel.rs +++ b/crates/collab_ui/src/collab_panel.rs @@ -1976,11 +1976,7 @@ impl CollabPanel { .left() .with_tooltip::( ix, - if is_active { - "Open channel notes" - } else { - "Join channel" - }, + "Join channel", None, theme.tooltip.clone(), cx,