Put max height on file panel (#2020)

This commit is contained in:
Shuchang Zheng
2025-03-25 07:12:30 -07:00
committed by GitHub
parent a1d94a152b
commit cc6fac7605

View File

@@ -39,6 +39,7 @@ import { getAggregatedExtractedInformation } from "./workflowRun/workflowRunUtil
import { Label } from "@/components/ui/label"; import { Label } from "@/components/ui/label";
import { CodeEditor } from "./components/CodeEditor"; import { CodeEditor } from "./components/CodeEditor";
import { cn } from "@/util/utils"; import { cn } from "@/util/utils";
import { ScrollArea, ScrollAreaViewport } from "@/components/ui/scroll-area";
function WorkflowRun() { function WorkflowRun() {
const [searchParams, setSearchParams] = useSearchParams(); const [searchParams, setSearchParams] = useSearchParams();
@@ -282,13 +283,17 @@ function WorkflowRun() {
{hasFileUrls && ( {hasFileUrls && (
<div className="space-y-4"> <div className="space-y-4">
<Label>Downloaded Files</Label> <Label>Downloaded Files</Label>
<div className="space-y-2"> <ScrollArea>
<ScrollAreaViewport className="max-h-[250px] space-y-2">
{fileUrls.length > 0 ? ( {fileUrls.length > 0 ? (
fileUrls.map((url, index) => { fileUrls.map((url, index) => {
return ( return (
<div key={url} title={url} className="flex gap-2"> <div key={url} title={url} className="flex gap-2">
<FileIcon className="size-6" /> <FileIcon className="size-6" />
<a href={url} className="underline underline-offset-4"> <a
href={url}
className="underline underline-offset-4"
>
<span>{`File ${index + 1}`}</span> <span>{`File ${index + 1}`}</span>
</a> </a>
</div> </div>
@@ -297,7 +302,8 @@ function WorkflowRun() {
) : ( ) : (
<div className="text-sm">No files downloaded</div> <div className="text-sm">No files downloaded</div>
)} )}
</div> </ScrollAreaViewport>
</ScrollArea>
</div> </div>
)} )}
</div> </div>