From a85b942388501a8d485f21bc1b75fbbb7a56971f Mon Sep 17 00:00:00 2001 From: Trang Doan Date: Mon, 27 Apr 2026 12:16:19 -0400 Subject: [PATCH 1/2] ENG-1646: Auto-resize content input and 512 char limit in node creation dialog (Roam) - Replace InputGroup with TextArea (growVertically) in create mode for auto-resize - Add 512 character limit with an inline warning message at the limit Co-Authored-By: Claude Sonnet 4.6 --- apps/roam/src/components/FuzzySelectInput.tsx | 49 +++++++++++-------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/apps/roam/src/components/FuzzySelectInput.tsx b/apps/roam/src/components/FuzzySelectInput.tsx index 2cfe27686..3ed235d0a 100644 --- a/apps/roam/src/components/FuzzySelectInput.tsx +++ b/apps/roam/src/components/FuzzySelectInput.tsx @@ -8,7 +8,6 @@ import React, { import { Button, TextArea, - InputGroup, Menu, MenuItem, Popover, @@ -18,6 +17,7 @@ import fuzzy from "fuzzy"; import { Result } from "~/utils/types"; const RESULTS_LIMIT = 50; +const MAX_CONTENT_LENGTH = 512; type FuzzySelectInputProps = { value?: T; @@ -44,7 +44,7 @@ const FuzzySelectInput = ({ const [isFocused, setIsFocused] = useState(false); const menuRef = useRef(null); - const inputRef = useRef(null); + const inputRef = useRef(null); const filteredItems = useMemo(() => { if (!query) return options; @@ -86,7 +86,7 @@ const FuzzySelectInput = ({ ); const handleKeyDown = useCallback( - (e: React.KeyboardEvent) => { + (e: React.KeyboardEvent) => { if (e.key === "ArrowDown") { e.preventDefault(); setActiveIndex((prev) => @@ -227,23 +227,32 @@ const FuzzySelectInput = ({ } target={ - handleInputChange(e.target.value)} - onKeyDown={handleKeyDown} - autoFocus={autoFocus} - placeholder={placeholder} - onFocus={() => { - setIsFocused(true); - }} - onBlur={() => { - setIsFocused(false); - setTimeout(() => setIsOpen(false), 200); - }} - /> +
+