feat: React Flow migration for flow editor canvas #82

Merged
chihlasm merged 19 commits from feat/react-flow-canvas into main 2026-02-19 05:43:34 +00:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 9bb7feaa0c - Show all commits

View File

@@ -162,9 +162,9 @@ export function NodeEditorPanel({ nodeId, onClose, onSelectType }: NodeEditorPan
const isRoot = treeStructure?.id === nodeId
return (
<div ref={panelRef} className="flex h-full w-[400px] shrink-0 flex-col border-l border-border bg-card">
<div ref={panelRef} className="flex h-full min-h-0 w-[400px] shrink-0 flex-col border-l border-border bg-card">
{/* Header */}
<div className="flex items-center gap-2 border-b border-border px-4 py-3">
<div className="flex items-center gap-2 border-b border-border px-4 py-3 shrink-0">
<span className={cn('flex h-5 w-5 shrink-0 items-center justify-center rounded', config.badgeClass)}>
<TypeIcon className="h-3 w-3" />
</span>
@@ -175,14 +175,14 @@ export function NodeEditorPanel({ nodeId, onClose, onSelectType }: NodeEditorPan
</div>
{/* Body — scrollable form area */}
<div className="flex-1 overflow-y-auto px-4 py-3">
<div className="min-h-0 flex-1 overflow-y-auto px-4 py-3">
{draft.type === 'decision' && <NodeFormDecision node={draft} onUpdate={handleDraftUpdate} />}
{draft.type === 'action' && <NodeFormAction node={draft} onUpdate={handleDraftUpdate} />}
{draft.type === 'solution' && <NodeFormResolution node={draft} onUpdate={handleDraftUpdate} />}
</div>
{/* Footer */}
<div className="flex items-center gap-2 border-t border-border px-4 py-3">
<div className="flex items-center gap-2 border-t border-border px-4 py-3 shrink-0">
<button
onClick={handleSave}
disabled={!isDirty}

View File

@@ -33,7 +33,7 @@ export function TreeEditorLayout({
return (
<div
className={cn(
'flex flex-1 overflow-hidden',
'flex min-h-0 flex-1 overflow-hidden',
isMobile ? 'flex-col' : 'flex-row'
)}
>