From e94764b8654652f17da0df134bae283a5d9119e1 Mon Sep 17 00:00:00 2001 From: dtonon Date: Mon, 27 Apr 2026 19:39:38 +0100 Subject: [PATCH] Optimize message editor --- src/lib/components/MessageEditor.svelte | 2 +- src/routes/thread/[id]/+page.svelte | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/components/MessageEditor.svelte b/src/lib/components/MessageEditor.svelte index 8cac93d..c069af3 100644 --- a/src/lib/components/MessageEditor.svelte +++ b/src/lib/components/MessageEditor.svelte @@ -357,7 +357,7 @@ onblur={onTextareaBlur} aria-autocomplete="list" aria-controls={mentionOpen ? "mention-listbox" : undefined} - class="w-full rounded-t border border-gray-200 px-3 py-2 focus:outline-none focus:ring-1 focus:ring-brand disabled:opacity-50 resize-none {minHeightClass}" + class="block w-full rounded-t border border-gray-200 px-3 py-2 focus:outline-none focus:ring-1 focus:ring-brand disabled:opacity-50 resize-y {minHeightClass}" > {#if mentionOpen}
0 && !replyContent.endsWith("\n\n") - ? replyContent.endsWith("\n") ? "\n" : "\n\n" - : ""; + const sep = + replyContent.length > 0 && !replyContent.endsWith("\n\n") + ? replyContent.endsWith("\n") + ? "\n" + : "\n\n" + : ""; replyContent = replyContent + sep + block + "\n\n"; await tick(); editorEl?.focus({ caretAtEnd: true }); @@ -228,11 +231,7 @@ >
- +
@@ -303,7 +302,8 @@ bind:this={editorEl} bind:value={replyContent} disabled={replying} - rows={4} + rows={8} + minHeightClass="min-h-[12rem]" placeholder="Write a reply..." contextPubkeys={allPosts.map((p) => p.pubkey)} {threadEventAuthors}