Skip to content

feat(grab): tray note grows with its text, tray is narrower - #114

Merged
mertbuilds merged 1 commit into
mainfrom
feat/grab-note-grow
Nov 26, 2026
Merged

mertbuilds merged 1 commit into
mainfrom
feat/grab-note-grow

Conversation

@mertbuilds

Copy link
Copy Markdown
Collaborator

Round 3 of grab multi select, from Mert's review: the note should be a textarea that can expand, and the tray should be narrower.

What changed

  • The note starts at one line and grows with its text, up to 8 lines (136px), then scrolls inside. It can also be dragged taller. Chromium uses field-sizing: content; other browsers get a small input listener that sets the height.
  • The tray is 320px wide instead of 380px (still calc(100vw - 32px) on small screens).
  • The hint can wrap instead of being cut with an ellipsis.

Proof

Real browser on https://knobs.localhost/#try, dark color scheme, two picks, six lines typed in the note:

Tray width Tray height Note height
Before typing 320px 138px 24px
After 6 lines 320px 218px 104px

All six lines show with no scrollbar, the page did not scroll, and the footer hint plus Copy 2 fit on one line at 320px. At a 390px viewport the tray is 320px wide. bun test in packages/devknobs: 4697 pass, 0 fail. Typecheck, lint and format check are clean. Screenshots are on Mert's review card.

Not checked in a browser: the fallback listener (Chromium supports field-sizing).

Weakened checks

None. The width test now expects 320px, and one test was added for the note growth, cap and resize.

Risk

Low. Tray CSS only, not released yet.

How to revert

Revert this PR's squash commit on main.

The note starts at one line, grows to 8 lines then scrolls, and drags taller.
field-sizing: content, with an input-height fallback where it is missing.
The hint wraps instead of being cut.
@mertbuilds
mertbuilds merged commit 15985a3 into main Nov 26, 2026
3 checks passed
@mertbuilds
mertbuilds deleted the feat/grab-note-grow branch November 26, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant