From 37f958f22d45a60e1b417ec70c830e82f5689081 Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Wed, 25 Mar 2026 21:33:52 -0700 Subject: [PATCH 1/2] Make buttons smaller --- sdk/ATTACHMENTS.md | 11 ---------- sdk/BUTTON_SIZE.md | 7 +++++++ sdk/sandbox/src/App.tsx | 2 +- .../src/components/ChatToggleButton.tsx | 20 +++++++++---------- 4 files changed, 18 insertions(+), 22 deletions(-) delete mode 100644 sdk/ATTACHMENTS.md create mode 100644 sdk/BUTTON_SIZE.md diff --git a/sdk/ATTACHMENTS.md b/sdk/ATTACHMENTS.md deleted file mode 100644 index 16c29c5..0000000 --- a/sdk/ATTACHMENTS.md +++ /dev/null @@ -1,11 +0,0 @@ -# Objective -I want the AI to be able to handle uploading attachments. Things such as upload images and PDFs, etc. - -The user should be able to upload the attachment by clicking on the "+" sign in sdk/widget/src/components/Composer.tsx and selectting on the file. They should also be able to drag and drop a file from their computer into the chat widget. - -Upon uploading the file, the Composer should show a very small attachment preview of what they've attached. - -Upon hitting submit with the attachment, the attachments, along with the message, should be sent to Vercel AI-SDK on the backend. - -# Consider -Also consider how we can handle images on the backend too. I want to be able to do cool workflows like ask the AI "What is in this image" and it be able to tell me what it is by analyzing the image. \ No newline at end of file diff --git a/sdk/BUTTON_SIZE.md b/sdk/BUTTON_SIZE.md new file mode 100644 index 0000000..ff69650 --- /dev/null +++ b/sdk/BUTTON_SIZE.md @@ -0,0 +1,7 @@ +# Objective + +Right now the Open Chat Widget button size is way too large. Make the button slightly smaller. On mobile, make it much smaller. Right now it takes up quite a lot of the screen. + +# What to do +1. Take a look at sdk/widget/src/components/ChatToggleButton.tsx +2. Make the button smaller for both desktop and mobile. \ No newline at end of file diff --git a/sdk/sandbox/src/App.tsx b/sdk/sandbox/src/App.tsx index 2c0b937..03af7f6 100644 --- a/sdk/sandbox/src/App.tsx +++ b/sdk/sandbox/src/App.tsx @@ -1,7 +1,7 @@ import { OpenChatWidget } from "../../widget/src"; const chatApiUrl = - import.meta.env.VITE_CHAT_API_URL ?? "http://localhost:8787/api/chat/notion"; + import.meta.env.VITE_CHAT_API_URL ?? "http://localhost:8787/api/chat/default"; export default function App() { return ( diff --git a/sdk/widget/src/components/ChatToggleButton.tsx b/sdk/widget/src/components/ChatToggleButton.tsx index b0ef65d..7ace502 100644 --- a/sdk/widget/src/components/ChatToggleButton.tsx +++ b/sdk/widget/src/components/ChatToggleButton.tsx @@ -10,12 +10,12 @@ type OpenChatWidgetToggleProps = { }; const DEFAULT_LOGO_SRC = HELPFUL_CHAT_LOGO_DATA_URI; -const BUTTON_SIZE_PX = 68; -const ICON_SIZE_PX = 54; -const CLOSE_ICON_SIZE_PX = 22; -const MOBILE_BUTTON_SIZE_PX = 56; -const MOBILE_ICON_SIZE_PX = 42; -const MOBILE_CLOSE_ICON_SIZE_PX = 18; +const BUTTON_SIZE_PX = 62; +const ICON_SIZE_PX = 48; +const CLOSE_ICON_SIZE_PX = 20; +const MOBILE_BUTTON_SIZE_PX = 46; +const MOBILE_ICON_SIZE_PX = 32; +const MOBILE_CLOSE_ICON_SIZE_PX = 16; function CloseIcon({ size }: { size: number }) { return ( @@ -56,7 +56,7 @@ export const ChatToggleButton = React.forwardRef< const closeIconSize = isMobile ? MOBILE_CLOSE_ICON_SIZE_PX : CLOSE_ICON_SIZE_PX; - const offset = isMobile ? "12px" : "16px"; + const offset = isMobile ? "10px" : "16px"; const hasUnread = !isOpen && unreadCount > 0; const unreadLabel = unreadCount > 99 ? "99+" : String(unreadCount); @@ -91,10 +91,10 @@ export const ChatToggleButton = React.forwardRef< position: "absolute", top: isMobile ? "-2px" : "0px", right: isMobile ? "-2px" : "0px", - minWidth: isMobile ? "18px" : "20px", - height: isMobile ? "18px" : "20px", + minWidth: isMobile ? "16px" : "20px", + height: isMobile ? "16px" : "20px", borderRadius: "9999px", - padding: "0 5px", + padding: isMobile ? "0 4px" : "0 5px", background: "#ef4444", color: "#ffffff", fontSize: isMobile ? "10px" : "11px", From c01e9ed9a542d95a4eb24f85c142e3f78fcf5bfd Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Wed, 25 Mar 2026 21:35:36 -0700 Subject: [PATCH 2/2] remove md --- sdk/BUTTON_SIZE.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 sdk/BUTTON_SIZE.md diff --git a/sdk/BUTTON_SIZE.md b/sdk/BUTTON_SIZE.md deleted file mode 100644 index ff69650..0000000 --- a/sdk/BUTTON_SIZE.md +++ /dev/null @@ -1,7 +0,0 @@ -# Objective - -Right now the Open Chat Widget button size is way too large. Make the button slightly smaller. On mobile, make it much smaller. Right now it takes up quite a lot of the screen. - -# What to do -1. Take a look at sdk/widget/src/components/ChatToggleButton.tsx -2. Make the button smaller for both desktop and mobile. \ No newline at end of file