diff --git a/web/src/lib/components/repo/pulls/PullReviewCommentForm.svelte b/web/src/lib/components/repo/pulls/PullReviewCommentForm.svelte
index 4a47f510b..ec9843e95 100644
--- a/web/src/lib/components/repo/pulls/PullReviewCommentForm.svelte
+++ b/web/src/lib/components/repo/pulls/PullReviewCommentForm.svelte
@@ -6,7 +6,7 @@
import Checkbox from "$lib/components/ui/Checkbox.svelte";
import Tag from "$lib/components/ui/Tag.svelte";
import ErrorAlert from "$lib/components/ui/Error.svelte";
- import Input from "$lib/components/ui/Input.svelte";
+ import Textarea from "$lib/components/ui/Textarea.svelte";
import Spinner from "$lib/components/ui/Spinner.svelte";
interface Props {
@@ -36,6 +36,8 @@
draft = "";
});
+ const rows = $derived(Math.min(draft.split("\n").length, 4));
+
const short = (hash: string) => hash.slice(0, 8);
@@ -43,12 +45,14 @@
Comment on {short(currentCommit)}
-
- 1 ? "vertical" : "horizontal"} class="w-full">
+
+
+
+ {#snippet template()}
+
+
+
+
+
+
+ {/snippet}
+
diff --git a/web/src/lib/components/ui/ButtonGroup.svelte b/web/src/lib/components/ui/ButtonGroup.svelte
index 16804216a..807547805 100644
--- a/web/src/lib/components/ui/ButtonGroup.svelte
+++ b/web/src/lib/components/ui/ButtonGroup.svelte
@@ -29,10 +29,19 @@
// by bordered neighbours. draw it inside the child instead.
"[&>*:focus-visible]:-outline-offset-2"
]
+ },
+ direction: {
+ horizontal: [
+ "",
+ ],
+ vertical: [
+ "flex-col",
+ ]
}
},
defaultVariants: {
- spaced: false
+ spaced: false,
+ direction: "horizontal"
}
});
@@ -54,13 +63,20 @@
interface Props {
spaced?: ButtonGroupVariants["spaced"];
+ direction?: ButtonGroupVariants["direction"];
class?: string;
children: Snippet;
}
- let { spaced = false, class: className, children, ...rest }: Props = $props();
+ let {
+ spaced = false,
+ direction = "horizontal",
+ class: className,
+ children,
+ ...rest
+ }: Props = $props();
- const classes = $derived(buttonGroup({ spaced, class: className }));
+ const classes = $derived(buttonGroup({ spaced, direction, class: className }));
diff --git a/web/src/lib/components/ui/Textarea.svelte b/web/src/lib/components/ui/Textarea.svelte
index f8b6d33e8..fbedcc389 100644
--- a/web/src/lib/components/ui/Textarea.svelte
+++ b/web/src/lib/components/ui/Textarea.svelte
@@ -21,7 +21,8 @@
// editor-sized floor would swallow the form.
size: {
regular: { textarea: "min-h-63.5" },
- small: { textarea: "min-h-20" }
+ small: { textarea: "min-h-20" },
+ unsized: { textarea: "" }
},
error: {
false: {