From 54dc7036c0bb498aac87a616e2ae372d548c33de Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Wed, 10 Sep 2025 11:41:58 -0700 Subject: [PATCH] feat: remove 1000 char input limit and allow expanding textarea (fixes #2399) --- .../components/QuestionInput/QuestionInput.module.css | 11 +++++++++-- .../src/components/QuestionInput/QuestionInput.tsx | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/frontend/src/components/QuestionInput/QuestionInput.module.css b/app/frontend/src/components/QuestionInput/QuestionInput.module.css index 0a34dea4f8..12817d58bf 100644 --- a/app/frontend/src/components/QuestionInput/QuestionInput.module.css +++ b/app/frontend/src/components/QuestionInput/QuestionInput.module.css @@ -10,7 +10,7 @@ .questionInputTextArea { width: 100%; - line-height: 2.5rem; + line-height: 1.5rem; } .questionInputButtonsContainer { @@ -21,6 +21,13 @@ @media (min-width: 992px) { .questionInputContainer { - height: 5.625rem; + /* Allow container to expand with growing multiline input (was fixed height) */ + min-height: 5.625rem; } } + +/* Limit uncontrolled growth while still allowing larger prompts; enable scrolling inside textarea if very large */ +.questionInputTextArea textarea { + max-height: 20rem; + overflow-y: auto !important; +} diff --git a/app/frontend/src/components/QuestionInput/QuestionInput.tsx b/app/frontend/src/components/QuestionInput/QuestionInput.tsx index c16ddc1be7..e8f2775a27 100644 --- a/app/frontend/src/components/QuestionInput/QuestionInput.tsx +++ b/app/frontend/src/components/QuestionInput/QuestionInput.tsx @@ -59,7 +59,7 @@ export const QuestionInput = ({ onSend, disabled, placeholder, clearOnSend, init const onQuestionChange = (_ev: React.FormEvent, newValue?: string) => { if (!newValue) { setQuestion(""); - } else if (newValue.length <= 1000) { + } else { setQuestion(newValue); } }; @@ -78,6 +78,7 @@ export const QuestionInput = ({ onSend, disabled, placeholder, clearOnSend, init disabled={disableRequiredAccessControl} placeholder={placeholder} multiline + autoAdjustHeight resizable={false} borderless value={question}