From e14ed5521f58b29a8d232b38306b53929eee3f09 Mon Sep 17 00:00:00 2001 From: Ryan Hopper-Lowe <46546486+ryanhopperlowe@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:48:57 -0600 Subject: [PATCH] enhance: adjust the offset of the workfow parameter dialog to overlay the invoke button (#727) --- ui/admin/app/components/chat/Chat.tsx | 2 +- ui/admin/app/components/chat/RunWorkflow.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/components/chat/Chat.tsx b/ui/admin/app/components/chat/Chat.tsx index 07d190c6..f9d057a4 100644 --- a/ui/admin/app/components/chat/Chat.tsx +++ b/ui/admin/app/components/chat/Chat.tsx @@ -59,7 +59,7 @@ export function Chat({ className }: ChatProps) { "w-full": threadId, })} popoverContentProps={{ - sideOffset: !threadId ? -150 : undefined, + className: cn({ "translate-y-[-50%]": !threadId }), }} loading={isInvoking || isRunning} disabled={isInvoking || isRunning} diff --git a/ui/admin/app/components/chat/RunWorkflow.tsx b/ui/admin/app/components/chat/RunWorkflow.tsx index 33578eed..4c9f2961 100644 --- a/ui/admin/app/components/chat/RunWorkflow.tsx +++ b/ui/admin/app/components/chat/RunWorkflow.tsx @@ -2,6 +2,7 @@ import { ComponentProps, useState } from "react"; import useSWR from "swr"; import { WorkflowService } from "~/lib/service/api/workflowService"; +import { cn } from "~/lib/utils"; import { RunWorkflowForm } from "~/components/chat/RunWorkflowForm"; import { Button, ButtonProps } from "~/components/ui/button"; @@ -57,7 +58,10 @@ export function RunWorkflow({ - + {