fix: grow a review comment's box with the comment - #178
Merged
Conversation
Every field review prose is typed into — the line comment, the batch note for the session, the reply, the summary above a review — was pinned at three lines, so anything longer than a sentence had to be dragged open before the first line was finished. The field now sizes to its content: `field-sizing: content` with the floor and the ceiling as min/max height, scrolling past the ceiling. `resize-y` stays, so a drag still overrides it in either direction. `rows` is inert under `field-sizing`, so the prop and its call sites go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every field review prose is typed into — the line comment, the batch note for the session, the reply, the summary above a review — was pinned at three lines. Anything longer than a sentence had to be dragged open before the first line was finished.
The field now sizes to its content:
field-sizing: contenton the sharedcommentFieldClass, withmin-h-16as the floor andmax-h-64as the ceiling; past the ceiling it scrolls.resize-ystays, so a drag still overrides it in either direction.rowsis inert underfield-sizing, so theCommentBoxprop and its call sites go with it.SubmitReviewDialogkeeps its tallermin-h-24floor.No JS: the growth is the browser's, and the shell is Chromium.
Test plan
biome checkclean (the standing a11y warning backlog only),tscclean,vitest636 passed,vite buildsucceeds.field-sizing:contentlands in the built CSS bundle.task dev, on a pull request: open a line comment, a batch note for the session and a reply — each starts short, grows while typing, stops at the ceiling and scrolls. The resize handle still drags in both directions.