diff --git a/apps/webapp/app/components/code/CodeBlock.tsx b/apps/webapp/app/components/code/CodeBlock.tsx index 18f5ef87a..f098cd735 100644 --- a/apps/webapp/app/components/code/CodeBlock.tsx +++ b/apps/webapp/app/components/code/CodeBlock.tsx @@ -12,6 +12,7 @@ type CodeBlockProps = { language?: "typescript" | "json"; showCopyButton?: boolean; align?: "top" | "center"; + maxHeight?: string; className?: string; }; @@ -20,9 +21,13 @@ export default function CodeBlock({ language = "typescript", showCopyButton = true, align = "center", + maxHeight, className, }: CodeBlockProps) { const [codeHtml, setCodeHtml] = useState(code); + const [isCollapsed, setIsCollapsed] = useState( + maxHeight === undefined ? false : true + ); useEffect(() => { const val = Prism.highlight(code, Prism.languages[language], language); setCodeHtml(val); @@ -31,12 +36,13 @@ export default function CodeBlock({ return (
-
+      
         
       {showCopyButton === true && (
         
       )}
+      {isCollapsed && (
+        
+ +
+ )}
); } diff --git a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/runs/$runId.tsx b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/runs/$runId.tsx index 1245be5a4..83f483d41 100644 --- a/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/runs/$runId.tsx +++ b/apps/webapp/app/routes/__app/orgs/$organizationSlug/workflows/$workflowSlug/runs/$runId.tsx @@ -334,7 +334,11 @@ function Webhook({ webhook }: { webhook: TriggerType }) { ))} {webhook.input && ( - + )} );