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}