From 8fbb408c58effca3a7a56952f0604520dc866c00 Mon Sep 17 00:00:00 2001 From: Brandon Oxendine Date: Mon, 7 Sep 2026 15:35:35 +0200 Subject: [PATCH] Disable save button instead of hiding it --- src/components/Discussion.svelte | 1 + src/components/ExtendedTextarea.svelte | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Discussion.svelte b/src/components/Discussion.svelte index 215a56514..7f037c260 100644 --- a/src/components/Discussion.svelte +++ b/src/components/Discussion.svelte @@ -344,6 +344,7 @@ borderVariant="ghost" stylePadding="0.5rem 0.75rem" hideDiscard + collapseActions placeholder="Leave a comment" submitActiveVariant="secondary" close={() => { diff --git a/src/components/ExtendedTextarea.svelte b/src/components/ExtendedTextarea.svelte index 275c172be..a1dc7f119 100644 --- a/src/components/ExtendedTextarea.svelte +++ b/src/components/ExtendedTextarea.svelte @@ -59,6 +59,8 @@ // reason for disabling. Defaults to `false` disableAttachments?: boolean | string; hideDiscard?: boolean; + // If true, the whole actions row stays hidden until the body has content. + collapseActions?: boolean; belowTextarea?: Snippet; } @@ -89,6 +91,7 @@ close, disableAttachments: attachDisabled = false, hideDiscard = false, + collapseActions = false, belowTextarea, }: Props = $props(); /* eslint-enable prefer-const */ @@ -469,7 +472,7 @@ {/if} {@render belowTextarea?.()} - {#if !hideDiscard || body.trim() !== ""} + {#if !collapseActions || body.trim() !== ""}
{#if !hideDiscard}