diff --git a/apps/arc-web/app/routes/workflow-definition.tsx b/apps/arc-web/app/routes/workflow-definition.tsx index 097451f55..eff7a9892 100644 --- a/apps/arc-web/app/routes/workflow-definition.tsx +++ b/apps/arc-web/app/routes/workflow-definition.tsx @@ -1,3 +1,4 @@ +import { ChevronRightIcon } from "@heroicons/react/20/solid"; import { useEffect, useRef, useState } from "react"; import { useParams } from "react-router"; import { workflowData } from "./workflow-detail"; @@ -7,13 +8,16 @@ function CodeBlock({ code, lang, filename, + defaultOpen = true, }: { code: string; lang: string; filename: string; + defaultOpen?: boolean; }) { const containerRef = useRef(null); const [ready, setReady] = useState(false); + const [open, setOpen] = useState(defaultOpen); useEffect(() => { let cancelled = false; @@ -45,22 +49,39 @@ function CodeBlock({ }; }, [code, lang]); + const lines = code.split("\n"); + const lineCount = lines.length; + const loc = lines.filter((l) => l.trim().length > 0).length; + return (
-
+ + +
+
+
+ + {!ready && ( +
+            {code}
+          
+ )}
- -
- - {!ready && ( -
-          {code}
-        
- )}
); } @@ -75,7 +96,7 @@ export default function WorkflowDefinition() { return (
- +
); diff --git a/apps/arc-web/app/routes/workflow-detail.tsx b/apps/arc-web/app/routes/workflow-detail.tsx index d8aa7624a..e1091dd56 100644 --- a/apps/arc-web/app/routes/workflow-detail.tsx +++ b/apps/arc-web/app/routes/workflow-detail.tsx @@ -275,12 +275,23 @@ export default function WorkflowDetail() { return (
-
-
-

{workflow.title}

- {workflow.filename} +
+
+
+

{workflow.title}

+ {workflow.filename} +
+

{workflow.description}

-

{workflow.description}

+