chore: mark US-020 as complete and update progress log
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e31a0b7bae
commit
9d46aa744d
2
prd.json
2
prd.json
|
|
@ -354,7 +354,7 @@
|
||||||
"Verify in browser using dev-browser skill"
|
"Verify in browser using dev-browser skill"
|
||||||
],
|
],
|
||||||
"priority": 20,
|
"priority": 20,
|
||||||
"passes": false,
|
"passes": true,
|
||||||
"notes": ""
|
"notes": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
17
progress.txt
17
progress.txt
|
|
@ -20,6 +20,8 @@
|
||||||
- React Flow editor is in `src/app/editor/[projectId]/` with page.tsx (server) and FlowchartEditor.tsx (client)
|
- React Flow editor is in `src/app/editor/[projectId]/` with page.tsx (server) and FlowchartEditor.tsx (client)
|
||||||
- React Flow requires 'use client' and importing 'reactflow/dist/style.css'
|
- React Flow requires 'use client' and importing 'reactflow/dist/style.css'
|
||||||
- Use toReactFlowNodes/toReactFlowEdges helpers to convert app types to React Flow types
|
- Use toReactFlowNodes/toReactFlowEdges helpers to convert app types to React Flow types
|
||||||
|
- Custom node components go in `src/components/editor/nodes/` with NodeProps<T> typing and useReactFlow() for updates
|
||||||
|
- Register custom node types in nodeTypes object (memoized with useMemo) and pass to ReactFlow component
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -305,3 +307,18 @@
|
||||||
- FlowchartEditor now uses flex-col layout to stack toolbar above canvas
|
- FlowchartEditor now uses flex-col layout to stack toolbar above canvas
|
||||||
- Placeholder handlers with TODO comments help track future implementation work
|
- Placeholder handlers with TODO comments help track future implementation work
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 2026-01-21 - US-020
|
||||||
|
- What was implemented: Custom DialogueNode component for displaying/editing character dialogue
|
||||||
|
- Files changed:
|
||||||
|
- src/components/editor/nodes/DialogueNode.tsx - new custom node component with editable speaker and text fields
|
||||||
|
- src/app/editor/[projectId]/FlowchartEditor.tsx - registered DialogueNode as custom node type
|
||||||
|
- **Learnings for future iterations:**
|
||||||
|
- Custom React Flow nodes use NodeProps<T> for typing, where T is the data shape
|
||||||
|
- Use useReactFlow() hook to get setNodes for updating node data from within the node component
|
||||||
|
- Handle components need Position enum (Position.Top, Position.Bottom) for positioning
|
||||||
|
- Custom handles can be styled with className and TailwindCSS, use ! prefix to override defaults (e.g., !h-3, !w-3)
|
||||||
|
- Node types must be registered in a nodeTypes object and passed to ReactFlow component
|
||||||
|
- Memoize nodeTypes with useMemo to prevent unnecessary re-renders
|
||||||
|
- Custom node components go in src/components/editor/nodes/ directory
|
||||||
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue