Skip to content

Conversation

@kylecarbs
Copy link
Member

Summary

Fixes #11 - The inline comment dialog textarea now auto-expands to fit content and allows manual resizing.

Changes

  • Auto-resize: Textarea automatically grows as you type to fit all content
  • Resize handle: Users can manually resize the textarea vertically via resize-vertical
  • Max height cap: Content is capped at 50vh by default to prevent the editor from dominating the viewport
  • Preview pane: Also respects the same maxHeight for consistency

Technical Details

The auto-resize is achieved via a useEffect that resets height to auto then sets it to scrollHeight on every value change. This ensures the textarea matches content size while respecting CSS constraints.

New props added to MarkdownEditor:

  • maxHeight (default: 50vh) - configurable max height before scroll appears

@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
pulldash Ready Ready Preview Comment Dec 11, 2025 4:44pm

- Use CSS `field-sizing: content` for modern browsers (Chrome 123+, Safari 26.2+)
- Add JS fallback auto-resize for browsers without field-sizing support
- Track user manual resize to avoid fighting with drag handle
- Reset resize state when comment is cleared (for new comments)
- Enable `resize-vertical` with `overflow-y: auto` for resize handle
- Increase default minHeight to 160px (~8 lines) for better editing UX
- Cap maxHeight at 50vh to prevent unbounded growth

Fixes #11
@kylecarbs kylecarbs merged commit 383b0ec into main Dec 11, 2025
3 of 4 checks passed
@kylecarbs kylecarbs deleted the fix-issue-11 branch December 11, 2025 18:24
@jennings
Copy link

Thank you!

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.

Inline comment dialog should expand to the height of the content while editing

2 participants