From 43d34822059762589e1e614d76d74fbca199211a Mon Sep 17 00:00:00 2001 From: Mert Duzgun <46185450+mert-duzgun@users.noreply.github.com> Date: Thu, 26 Nov 2026 12:42:14 +0300 Subject: [PATCH] fix(grab): tray note starts at two rows --- packages/devknobs/src/grab/tray.ts | 4 ++-- packages/devknobs/test/grab-tray.test.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/devknobs/src/grab/tray.ts b/packages/devknobs/src/grab/tray.ts index 0c8f1ca..69e26db 100644 --- a/packages/devknobs/src/grab/tray.ts +++ b/packages/devknobs/src/grab/tray.ts @@ -99,7 +99,7 @@ export const TRAY_CSS = ` box-sizing: border-box; flex: none; width: 100%; - min-height: 24px; + min-height: 40px; max-height: 136px; padding: 4px 6px; overflow-y: auto; @@ -199,7 +199,7 @@ export function createTray(options: TrayOptions): Tray { node.setAttribute("aria-label", "Picked elements"); const list = element("div", "list"); const note = element("textarea"); - note.rows = 1; + note.rows = 2; if (typeof CSS === "undefined" || !CSS.supports("field-sizing", "content")) { note.addEventListener("input", () => { note.style.height = "auto"; diff --git a/packages/devknobs/test/grab-tray.test.ts b/packages/devknobs/test/grab-tray.test.ts index 3511056..cb93bae 100644 --- a/packages/devknobs/test/grab-tray.test.ts +++ b/packages/devknobs/test/grab-tray.test.ts @@ -21,6 +21,7 @@ describe("TRAY_CSS", () => { test("grows the note with its text up to a cap, and lets it be dragged taller", () => { expect(TRAY_CSS).toContain("field-sizing: content;"); + expect(TRAY_CSS).toContain("min-height: 40px;"); expect(TRAY_CSS).toContain("max-height: 136px;"); expect(TRAY_CSS).toContain("resize: vertical;"); expect(TRAY_CSS).not.toContain("resize: none;");