refactor: Simplify StartNode component to improve clarity
- Removed the trimming of the analysis title, now displaying only the node label or defaulting to 'Start'. - Updated documentation to clarify the purpose of properties, specifically distinguishing between display on the canvas and analysis metadata. These changes enhance the readability and maintainability of the StartNode component in the workflow editor.
This commit is contained in:
parent
0ce98e8973
commit
4c9e0e3c98
|
|
@ -3,16 +3,14 @@ import { Handle, Position } from 'reactflow'
|
|||
/**
|
||||
* StartNode - Workflow Einstiegspunkt
|
||||
*
|
||||
* Properties:
|
||||
* - data.label: Node-Label (default: "Start")
|
||||
* - selected: Boolean (Node ist ausgewählt)
|
||||
* - data.label: Anzeige auf dem Canvas (Node-Name)
|
||||
* - data.analysis_title: nur für KI-Analyse-UI, nicht auf dem Canvas
|
||||
*/
|
||||
export function StartNode({ data, selected }) {
|
||||
const title = (data.analysis_title || '').trim()
|
||||
return (
|
||||
<div className={`workflow-node start-node ${selected ? 'selected' : ''}`}>
|
||||
<div className="node-icon">🚀</div>
|
||||
<div className="node-label">{title || data.label || 'Start'}</div>
|
||||
<div className="node-label">{data.label || 'Start'}</div>
|
||||
|
||||
{/* Nur Source Handle (kein Target, da Einstiegspunkt) */}
|
||||
<Handle
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user