From 5979293e1bb693921718627dd139d157c134f4e7 Mon Sep 17 00:00:00 2001 From: Zimeng Xiong Date: Fri, 21 Nov 2025 23:15:41 -0800 Subject: [PATCH] Dynamically resize text box for editing name --- frontend/src/pages/Editor.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Editor.tsx b/frontend/src/pages/Editor.tsx index d31593c..328c95c 100644 --- a/frontend/src/pages/Editor.tsx +++ b/frontend/src/pages/Editor.tsx @@ -565,7 +565,8 @@ export const Editor: React.FC = () => { value={newName} onChange={(e) => setNewName(e.target.value)} onBlur={() => setIsRenaming(false)} - className="font-medium text-gray-900 dark:text-white bg-transparent px-2 py-1 border-2 border-indigo-500 rounded-md outline-none" + className="font-medium text-gray-900 dark:text-white bg-transparent px-2 py-1 border-2 border-indigo-500 rounded-md outline-none min-w-[200px]" + style={{ width: `${Math.max(200, newName.length * 9 + 20)}px` }} /> ) : (