Skip to content

Commit 578943c

Browse files
committed
fix: adjust layout and positioning in ChatTextArea for better edit mode experience
1 parent c4c4780 commit 578943c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

webview-ui/src/components/chat/ChatTextArea.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -903,12 +903,12 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
903903
return (
904904
<div
905905
className={cn(
906-
"relative flex flex-col gap-1 bg-editor-background outline-none border border-none box-border",
907-
isEditMode ? "p-2 w-full" : "px-1.5 pb-1 w-[calc(100%-16px)] ml-auto mr-auto",
906+
"flex flex-col gap-1 bg-editor-background outline-none border border-none box-border",
907+
isEditMode ? "p-2 w-full" : "relative px-1.5 pb-1 w-[calc(100%-16px)] ml-auto mr-auto",
908908
)}>
909-
<div className="relative">
909+
<div className={cn(!isEditMode && "relative")}>
910910
<div
911-
className={cn("chat-text-area", "relative", "flex", "flex-col", "outline-none")}
911+
className={cn("chat-text-area", !isEditMode && "relative", "flex", "flex-col", "outline-none")}
912912
onDrop={handleDrop}
913913
onDragOver={(e) => {
914914
// Only allowed to drop images/files on shift key pressed.
@@ -940,10 +940,10 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
940940
className={cn(
941941
"absolute",
942942
"bottom-full",
943-
"left-0",
943+
isEditMode ? "left-6" : "left-0",
944944
"right-0",
945945
"z-[1000]",
946-
"mb-2",
946+
isEditMode ? "-mb-3" : "mb-2",
947947
"filter",
948948
"drop-shadow-md",
949949
)}>

0 commit comments

Comments
 (0)