ralph/vn-flowchart-editor #1

Merged
GHMiranda merged 14 commits from ralph/vn-flowchart-editor into master 2026-01-22 21:53:46 +00:00
2 changed files with 15 additions and 1 deletions
Showing only changes of commit e686719f29 - Show all commits

View File

@ -552,7 +552,7 @@
"Verify in browser using dev-browser skill"
],
"priority": 31,
"passes": false,
"passes": true,
"notes": ""
},
{

View File

@ -447,3 +447,17 @@
- Escape key listener via `document.addEventListener('keydown', handler)` for menu close
- NodeMouseHandler and EdgeMouseHandler types from reactflow provide proper typing for context menu callbacks
---
## 2026-01-22 - US-031
- What was implemented: Condition editor modal for adding/editing/removing conditions on edges
- Files changed:
- src/components/editor/ConditionEditor.tsx - new modal component with form for variable name, operator, and value
- src/app/editor/[projectId]/FlowchartEditor.tsx - integrated condition editor with double-click and context menu triggers
- **Learnings for future iterations:**
- Use `onEdgeDoubleClick` React Flow callback for double-click on edges
- Store condition editor state separately from context menu state (`conditionEditor` vs `contextMenu`)
- Use `edge.data.condition` to access condition object on edges
- When removing properties from edge data, use `delete` operator instead of destructuring to avoid lint warnings about unused variables
- Condition type has operators: '>' | '<' | '==' | '>=' | '<=' | '!='
- Preview condition in modal using template string: `${variableName} ${operator} ${value}`
---