From 3cb99f62152257c0a78c5287f2337d7ef6d247ed Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Fri, 23 May 2025 17:58:34 -0700 Subject: [PATCH 1/6] update ui for attachment item component --- .../PromptInput/Attachments/index.jsx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx index ee6155ab2ce..6a1f07051fa 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx @@ -21,7 +21,7 @@ import { Tooltip } from "react-tooltip"; export default function AttachmentManager({ attachments }) { if (attachments.length === 0) return null; return ( -
+
{attachments.map((attachment) => ( ))} @@ -45,21 +45,20 @@ function AttachmentItem({ attachment }) { if (status === "in_progress") { return ( -
+
-
-

{file.name}

-

- {humanFileSize(file.size)} +

+

{file.name}

+

+ Uploading...

@@ -72,7 +71,7 @@ function AttachmentItem({ attachment }) {
- +
-
-

{file.name}

-

+

+

{file.name}

+

File embedded!

From f4b9dbce8bb6f9879b02170d622ad7d3b18b1a5f Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Tue, 27 May 2025 12:35:12 -0700 Subject: [PATCH 2/6] fix attachment styles and spacing of prompt input --- .../PromptInput/Attachments/index.jsx | 62 +++++++++++-------- .../ChatContainer/PromptInput/index.jsx | 6 +- frontend/src/index.css | 16 +++++ frontend/tailwind.config.js | 8 +++ 4 files changed, 62 insertions(+), 30 deletions(-) diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx index 6a1f07051fa..ad1abca4e98 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx @@ -10,7 +10,6 @@ import { WarningOctagon, X, } from "@phosphor-icons/react"; -import { humanFileSize } from "@/utils/numbers"; import { REMOVE_ATTACHMENT_EVENT } from "../../DnDWrapper"; import { Tooltip } from "react-tooltip"; @@ -45,19 +44,20 @@ function AttachmentItem({ attachment }) { if (status === "in_progress") { return ( -
+
-

{file.name}

-

+

+ {file.name} +

+

Uploading...

@@ -71,29 +71,31 @@ function AttachmentItem({ attachment }) {
- +
-
-

+

+

{file.name}

-

- {error ?? "this file failed to upload"}. It will not be available - in the workspace. +

+ {error ?? "File not embedded!"}

@@ -113,13 +115,13 @@ function AttachmentItem({ attachment }) {
@@ -132,16 +134,16 @@ function AttachmentItem({ attachment }) { /> ) : (
- +
)} -
-

+

+

{file.name}

-

+

Image attached!

@@ -161,13 +163,13 @@ function AttachmentItem({ attachment }) {
@@ -175,11 +177,17 @@ function AttachmentItem({ attachment }) {
- +
-

{file.name}

-

+

+ {file.name} +

+

File embedded!

diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx index fa1f08530e2..14c1b173479 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx @@ -256,9 +256,9 @@ export default function PromptInput({ className="flex flex-col gap-y-1 rounded-t-lg md:w-3/4 w-full mx-auto max-w-xl items-center" >
-
+
-
+