Skip to content

custom hook useAutoSize dynamic input/textarea sizing in workspace#682

Merged
moehdotdev merged 1 commit into
mainfrom
home-uiux-text-format
Apr 19, 2026
Merged

custom hook useAutoSize dynamic input/textarea sizing in workspace#682
moehdotdev merged 1 commit into
mainfrom
home-uiux-text-format

Conversation

@moehdotdev

@moehdotdev moehdotdev commented Apr 19, 2026

Copy link
Copy Markdown
Member

added a custom useAutoSize hook to automatically resize inputs and textareas based on content, and applied it to table names, workspace names, and note titles.

previously, long titles would overflow or require manual resizing. the new hook uses a mirror element + useLayoutEffect to calculate exact width/height dynamically, preventing layout jumps.

benefits

  • inputs and textareas now grow/shrink smoothly with content
  • better UX when editing long names or titles
  • reusable hook for future components
  • fixed some ref typing and added container width limits to prevent overflow

changes

  • app/home/[id]/WorkingSpacePageClient.tsx
    • added useAutoSize hook with mirror span technique
    • applied it to table tab editing, workspace name editing, grid note titles (textarea), and list note titles
    • added container refs to respect parent width
    • cleaned up some old comments and simplified a few spots

@vercel

vercel Bot commented Apr 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
notevo Ready Ready Preview, Comment Apr 19, 2026 3:36pm

@moehdotdev moehdotdev merged commit 1464ff9 into main Apr 19, 2026
2 checks passed
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