Fix clicking in to agent message editor and tighten up vertical spacing (#32765)
* Adds `min_lines` to `EditorMode::AutoHeight` and use `min_lines: 4` in agent message editor. This makes it so that clicks in the blank space below the first line of the editor also focus it, instead of needing to click the very first line. * Removes the div wrapping the editor, as it was only there to set `min_h_16()`. This also tightens up the min space given to the editor - before it was not evenly dividing the number of lines. * Further tightens up vertical spacing by using `gap_1` instead of `gap_4` between editor and controls below At 4 line min height (after on the left, before on the right):  At 5 lines, one more than min height (after on the left, before on the right):  Release Notes: - Agent: Fixed clicking to focus the message editor to also work for clicks below the last line.
This commit is contained in:
parent
a994666888
commit
681c88d4e7
10 changed files with 73 additions and 46 deletions
|
@ -17,7 +17,7 @@ impl AutoHeightEditorStory {
|
|||
)]);
|
||||
cx.new(|cx| Self {
|
||||
editor: cx.new(|cx| {
|
||||
let mut editor = Editor::auto_height(3, window, cx);
|
||||
let mut editor = Editor::auto_height(1, 3, window, cx);
|
||||
editor.set_soft_wrap_mode(language::language_settings::SoftWrap::EditorWidth, cx);
|
||||
editor
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue