refactor: Script Library and Builder design critique fixes
Library: - Clear CTA hierarchy: "Build New Script" primary, "Import Script" ghost, "Manage" demoted to text link - "New from Script" → "Import Script" (clearer label) Script Builder: - Add suggestion chips for first-time users (4 common MSP tasks) - Chips auto-hide after first message Design system normalization: - ScriptPreviewModal: bg-black/80 → bg-black/40, text-blue-400 → text-accent-text, emerald save button → primary, inline rgba → CSS variables - ScriptCodeBlock: bg-[rgba(0,0,0,0.3)] → bg-code, text-blue-400 → text-accent-text, text-text-muted typo fixed, emerald button → ghost style - TemplateCard: emerald/amber/rose badges → success-dim/warning-dim/danger-dim, ShieldAlert amber → warning token - ParameterDetectorStepper: blue focus ring → orange, amber → warning token, "Candidate" → "Variable" in stepper progress Jargon clarification: - "Detect Parameters" → "Find Variables" - "Detected Parameters" → "Configurable Variables" - "Parameters (N)" → "Variables (N)" - Detection summary copy reworded for clarity Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -189,6 +189,7 @@ export default function ScriptBuilderPage() {
|
||||
<ScriptBuilderInput
|
||||
onSend={(content) => handleSend(content)}
|
||||
disabled={isLoading}
|
||||
showSuggestions={messages.length === 0}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -97,35 +97,37 @@ export default function ScriptLibraryPage() {
|
||||
<div>
|
||||
<h1 className="text-2xl font-heading font-bold text-foreground">Script Library</h1>
|
||||
<p className="text-sm text-muted-foreground mt-1">
|
||||
Browse PowerShell templates, fill in parameters, and generate ready-to-run scripts.
|
||||
Browse templates, fill in parameters, and generate ready-to-run scripts.
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{isEngineer && (
|
||||
<div className="flex items-center gap-2 mt-2">
|
||||
<>
|
||||
<Link
|
||||
to="/scripts/manage"
|
||||
className="inline-flex items-center gap-1.5 text-xs text-primary bg-accent-dim hover:bg-primary/15 px-2.5 py-1 rounded-full transition-colors group"
|
||||
className="inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground px-2.5 py-1.5 rounded-lg transition-colors"
|
||||
>
|
||||
<Settings size={12} className="group-hover:rotate-90 transition-transform duration-300" />
|
||||
Manage Templates
|
||||
<Settings size={12} />
|
||||
Manage
|
||||
</Link>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowImportPanel(true)}
|
||||
className="inline-flex items-center gap-1.5 text-xs text-primary bg-accent-dim hover:bg-primary/15 px-2.5 py-1 rounded-full transition-colors"
|
||||
className="inline-flex items-center gap-1.5 rounded-lg border border-border px-3 py-2 text-sm text-muted-foreground hover:text-foreground hover:border-[var(--color-border-hover)] transition-colors"
|
||||
>
|
||||
<FileUp size={12} />
|
||||
New from Script
|
||||
<FileUp size={14} />
|
||||
Import Script
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
<Link
|
||||
to="/script-builder"
|
||||
className="inline-flex items-center gap-2 bg-primary text-white font-semibold rounded-lg px-4 py-2 text-sm hover:brightness-110 active:scale-[0.98] transition-all"
|
||||
>
|
||||
<Wand2 size={14} />
|
||||
Build New Script
|
||||
</Link>
|
||||
</div>
|
||||
<Link
|
||||
to="/script-builder"
|
||||
className="inline-flex items-center gap-2 bg-primary text-white font-semibold rounded-lg px-4 py-2 hover:brightness-110 active:scale-[0.98] transition-all"
|
||||
>
|
||||
<Wand2 size={16} />
|
||||
Build a New Script
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{/* Tab bar */}
|
||||
|
||||
Reference in New Issue
Block a user