Skip to content

Commit

Permalink
enhance: adjust the offset of the workfow parameter dialog to overlay…
Browse files Browse the repository at this point in the history
… the invoke button (#727)
  • Loading branch information
ryanhopperlowe authored Dec 2, 2024
1 parent dde0a22 commit e14ed55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/admin/app/components/chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
6 changes: 5 additions & 1 deletion ui/admin/app/components/chat/RunWorkflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -57,7 +58,10 @@ export function RunWorkflow({
</Button>
</PopoverTrigger>

<PopoverContent {...popoverContentProps} className="min-w-full">
<PopoverContent
{...popoverContentProps}
className={cn("min-w-full", popoverContentProps?.className)}
>
<RunWorkflowForm
params={params}
onSubmit={(params) => {
Expand Down

0 comments on commit e14ed55

Please sign in to comment.