From 69404e0e126a04cb9360dd7b0f74afc48866c86d Mon Sep 17 00:00:00 2001 From: chihlasm Date: Fri, 13 Mar 2026 02:18:13 -0400 Subject: [PATCH] fix: help_text ordering and Input component usage in scripts components - ScriptParameterField: extract error

from select/boolean input blocks and remove error prop from Input/Textarea components so all types render help_text before error via unified bottom rendering - ScriptFilterBar: replace native with shared component from @/components/ui/Input, preserving search icon via absolute positioning wrapper Co-Authored-By: Claude Sonnet 4.6 --- .../components/scripts/ScriptFilterBar.tsx | 9 +-- .../scripts/ScriptParameterField.tsx | 67 +++++++++---------- 2 files changed, 35 insertions(+), 41 deletions(-) diff --git a/frontend/src/components/scripts/ScriptFilterBar.tsx b/frontend/src/components/scripts/ScriptFilterBar.tsx index 3bbfea3d..e894dbcb 100644 --- a/frontend/src/components/scripts/ScriptFilterBar.tsx +++ b/frontend/src/components/scripts/ScriptFilterBar.tsx @@ -1,6 +1,7 @@ import { useEffect, useRef } from 'react' import { Search } from 'lucide-react' import { cn } from '@/lib/utils' +import { Input } from '@/components/ui/Input' import { useScriptGeneratorStore } from '@/store/scriptGeneratorStore' interface Props { @@ -61,13 +62,13 @@ export function ScriptFilterBar({ inputValue, setInputValue }: Props) { {/* Search input */}

- - + setInputValue(e.target.value)} - placeholder="Search templates…" - className="pl-8 pr-3 py-1.5 text-sm rounded-md border border-border bg-card text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-[rgba(6,182,212,0.3)] focus:ring-1 focus:ring-[rgba(6,182,212,0.2)] w-52" + placeholder="Search templates..." + className="pl-8 w-52" />
diff --git a/frontend/src/components/scripts/ScriptParameterField.tsx b/frontend/src/components/scripts/ScriptParameterField.tsx index 5e2bf98a..d3c62f6e 100644 --- a/frontend/src/components/scripts/ScriptParameterField.tsx +++ b/frontend/src/components/scripts/ScriptParameterField.tsx @@ -41,7 +41,6 @@ export function ScriptParameterField({ param, value, error, disabled }: Props) { : (param.placeholder ?? undefined) } disabled={disabled} - error={error} /> ) } else if (param.type === 'password') { @@ -54,7 +53,6 @@ export function ScriptParameterField({ param, value, error, disabled }: Props) { onChange={handleChange} placeholder={param.placeholder ?? undefined} disabled={disabled} - error={error} />