From 119d17819b705085bcd136ef10d49013a1a1cb0a Mon Sep 17 00:00:00 2001 From: chihlasm Date: Wed, 1 Apr 2026 06:52:50 +0000 Subject: [PATCH] design: overhaul Edit Procedure page layout and color system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move procedure name into inline-editable toolbar input; replace static h1 - Toolbar now uses bg-sidebar for proper depth hierarchy vs bg-card config zone - Config zone (Details/Intake/Schedule accordions) gets explicit bg-card + border-b creating clear visual separation from the step canvas below - Step canvas switches to bg-page background for distinct work surface - Replace all hover:bg-accent (orange) with hover:bg-elevated or hover:bg-white/[0.08] throughout toolbar, accordion headers, step cards, and editor buttons - Fix step number badges: bg-accent (orange) → bg-white/[0.10] in StepList + StepEditor - Fix procedure_end step background: bg-accent/50 → bg-elevated/40 - CollapsibleEditorSection: hover:bg-accent/50 → hover:bg-white/[0.05] - Input fields in StepEditor: bg-card → bg-elevated for depth inside card surfaces - Move Content Type selector out of "More Options" into main step editor body - Rename "More Options" → "Advanced Options" for clarity - Replace Shield icon with ListOrdered for Steps section heading (semantic fix) - Bottom Add Step button: better contrast with border-white/20 + hover:bg-elevated/30 - Remove Name field from Details accordion (now lives in toolbar) - Update Details accordion summary: shows tags, visibility, description preview - Dirty indicator: "Unsaved changes" text → compact amber dot with tooltip Co-Authored-By: Claude Sonnet 4.6 --- .../CollapsibleEditorSection.tsx | 2 +- .../procedural-editor/StepEditor.tsx | 74 ++++++------ .../components/procedural-editor/StepList.tsx | 18 +-- frontend/src/pages/ProceduralEditorPage.tsx | 110 +++++++++--------- 4 files changed, 100 insertions(+), 104 deletions(-) diff --git a/frontend/src/components/procedural-editor/CollapsibleEditorSection.tsx b/frontend/src/components/procedural-editor/CollapsibleEditorSection.tsx index 2325e4ff..e7d8b95c 100644 --- a/frontend/src/components/procedural-editor/CollapsibleEditorSection.tsx +++ b/frontend/src/components/procedural-editor/CollapsibleEditorSection.tsx @@ -41,7 +41,7 @@ export function CollapsibleEditorSection({ onClick={handleToggle} aria-expanded={isExpanded} aria-controls={sectionId} - className="flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors hover:bg-accent/50" + className="flex w-full items-center gap-3 px-4 py-2.5 text-left transition-colors hover:bg-white/[0.05]" > Edit Section Header @@ -42,7 +42,7 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa value={step.title} onChange={(e) => onUpdate({ title: e.target.value })} placeholder="Section title" - className="w-full rounded border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" + className="w-full rounded border border-border bg-elevated px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" /> @@ -54,14 +54,14 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa {/* Header */}
- + {stepNumber} Edit Step
@@ -75,7 +75,7 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa type="text" value={step.title} onChange={(e) => onUpdate({ title: e.target.value })} - className="w-full rounded border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" + className="w-full rounded border border-border bg-elevated px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" />
@@ -91,7 +91,7 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa onChange={(e) => onUpdate({ estimated_minutes: e.target.value ? parseInt(e.target.value) : undefined })} placeholder="—" min={1} - className="w-full rounded border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" + className="w-full rounded border border-border bg-elevated px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" /> @@ -103,7 +103,7 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa onChange={(e) => onUpdate({ description: e.target.value })} placeholder="Step instructions. Use [VAR:name] for variables." rows={4} - className="w-full rounded border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" + className="w-full rounded border border-border bg-elevated px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" /> {availableVariables.length > 0 && (
@@ -132,44 +132,44 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa onChange={(e) => onUpdate({ commands: e.target.value || undefined })} placeholder="Install-WindowsFeature AD-Domain-Services -IncludeManagementTools" rows={3} - className="w-full rounded border border-border bg-card px-3 py-2 font-mono text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" + className="w-full rounded border border-border bg-elevated px-3 py-2 font-mono text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" />
- {/* More Options toggle */} + {/* Content Type */} +
+ +
+ {CONTENT_TYPE_OPTIONS.map((opt) => ( + + ))} +
+
+ + {/* Advanced Options toggle */} {showMore && (
- {/* Content Type */} -
- -
- {CONTENT_TYPE_OPTIONS.map((opt) => ( - - ))} -
-
- {/* Warning text */} {(step.content_type === 'warning' || step.warning_text) && (
@@ -195,7 +195,7 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa value={step.expected_outcome || ''} onChange={(e) => onUpdate({ expected_outcome: e.target.value || undefined })} placeholder="Server should respond with..." - className="w-full rounded border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" + className="w-full rounded border border-border bg-elevated px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" />
@@ -211,7 +211,7 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa value={step.verification_prompt || ''} onChange={(e) => onUpdate({ verification_prompt: e.target.value || undefined })} placeholder="Confirm the role was installed" - className="w-full rounded border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" + className="w-full rounded border border-border bg-elevated px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" />
@@ -219,7 +219,7 @@ export function StepEditor({ step, stepNumber, onUpdate, onCollapse, availableVa - + {stepNumber} @@ -277,7 +277,7 @@ export function StepList({ onStepContextMenu }: StepListProps) { @@ -324,7 +324,7 @@ export function StepList({ onStepContextMenu }: StepListProps) { {/* Add step button at bottom */} -
- {isMaintenance - ? - : } -

- {isEditMode ? `Edit ${flowLabel}` : `New ${flowLabel}`} - {name && — {name}} -

-
+
+ + +
+ {isMaintenance + ? + : } + setName(e.target.value)} + placeholder={`Untitled ${flowLabel}`} + className="min-w-0 flex-1 bg-transparent text-sm font-semibold text-heading placeholder:text-muted-foreground focus:outline-none" + /> + {isDirty && ( + + )}
-
- {isDirty && ( - Unsaved changes - )} +
- {/* Collapsible sections */} -
+ {/* Config zone */} +
} @@ -328,17 +333,6 @@ export function ProceduralEditorPage() { onToggle={() => toggleSection('details')} >
-
- - setName(e.target.value)} - placeholder="e.g. Domain Controller Build" - className="w-full rounded-lg border border-border bg-card px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20" - /> -
-