From b446117d24c589f1e46d0187c93e11ac3716d618 Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Wed, 15 May 2024 12:43:50 -0700 Subject: [PATCH 1/3] increase max height of chat input for larger messages --- .../WorkspaceChat/ChatContainer/PromptInput/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx index df08bcc7c46..fbc4e46b48d 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx @@ -130,7 +130,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 md:max-h-[350px] 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" placeholder={"Send a message"} /> {buttonDisabled ? ( From 4b8b300472e672e9aed619e296834ff60a4c32e4 Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Thu, 16 May 2024 11:15:08 -0700 Subject: [PATCH 2/3] allow resize of input on mobile up to 50vh --- .../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 fbc4e46b48d..17452a613ac 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 md:max-h-[350px] 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] 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" placeholder={"Send a message"} /> {buttonDisabled ? ( From 2b6236113357d67a8377fb9e3f027ab70b1cf6b2 Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Thu, 16 May 2024 11:17:12 -0700 Subject: [PATCH 3/3] remove duplicate css rule --- .../WorkspaceChat/ChatContainer/PromptInput/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx index 17452a613ac..b67f5492fc8 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx @@ -128,7 +128,7 @@ export default function PromptInput({ adjustTextArea(e); }} value={promptInput} - className="cursor-text max-h-[50vh] md:max-h-[350px] 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 ? (