From 381bdf0b61ff2a2a2096d7903f934a37eba7ea34 Mon Sep 17 00:00:00 2001 From: Sean Hatfield Date: Thu, 16 May 2024 11:17:33 -0700 Subject: [PATCH] [FIX] Improve readability for larger messages entered into chat input (#1410) * increase max height of chat input for larger messages * allow resize of input on mobile up to 50vh * remove duplicate css rule --------- Co-authored-by: Timothy Carambat --- .../WorkspaceChat/ChatContainer/PromptInput/index.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx index df08bcc7..b67f5492 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx @@ -3,7 +3,6 @@ import SlashCommandsButton, { SlashCommands, useSlashCommands, } from "./SlashCommands"; -import { isMobile } from "react-device-detect"; import debounce from "lodash.debounce"; import { PaperPlaneRight } from "@phosphor-icons/react"; import StopGenerationButton from "./StopGenerationButton"; @@ -83,7 +82,6 @@ export default function PromptInput({ }; const adjustTextArea = (event) => { - if (isMobile) return false; const element = event.target; element.style.height = "auto"; element.style.height = `${element.scrollHeight}px`; @@ -130,7 +128,7 @@ export default function PromptInput({ adjustTextArea(e); }} value={promptInput} - className="cursor-text max-h-[100px] md:min-h-[40px] mx-2 md:mx-0 py-2 w-full text-[16px] md:text-md text-white bg-transparent placeholder:text-white/60 resize-none active:outline-none focus:outline-none flex-grow" + className="cursor-text max-h-[50vh] md:max-h-[350px] md:min-h-[40px] mx-2 md:mx-0 py-2 w-full text-[16px] md:text-md text-white bg-transparent placeholder:text-white/60 resize-none active:outline-none focus:outline-none flex-grow" placeholder={"Send a message"} /> {buttonDisabled ? (