-
Notifications
You must be signed in to change notification settings - Fork 4
Diagram editor #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagram editor #99
Conversation
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
…pulse into koonpeng/diagram-editor
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
Turns out this is due to reactflow only returning the new values on the next render, fixed by avoiding use of reactflow's state.
Added labels to buffer edges.
fixed
updated the icons.
Which operation did you see the inputs to be orange? Both ordinary inputs and outputs should be white-ish. Orange is for stream outputs. |
Signed-off-by: Teo Koon Peng <[email protected]>
In the videos you can see that Would ReactFlow be able to support having streams come out of the side (maybe right side) of the box instead of the bottom? |
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
done. |
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried out the editor with the recent fixes, and the behaviors are really good now!
node operations and node builders do not report the streams they output so we must assume all node operations may output a stream.
You're right, this is something I forgot to follow up on when I added the ability for diagrams to support streams. I'll try to get streams into the node builder registry ASAP.
But even if we know which node operations may output streams, we can't display it on the UI atm as the edge handles are fixed based on the type of operation atm.
It's not urgent but I think this is worth following up on in a future PR. I'll open an issue ticket for this.
While expanding on the calculator example, I added a fibonacci node builder that streams out numbers of the Fibonacci sequence. It seems the UI does not allow you to connect a stream to an input slot:
stream_connection_bug.mp4
Furthermore if I create the diagram manually with the intended "stream_out"
setup and then upload it to the editor, the UI displays it as connected to the node output:

When I look at what kind of diagram gets generated from this, the print
operation is now connected to the output of fibonacci
instead of connected to its stream.
I would suggest we do one of the following before merging:
- Since there are still some loose ends with streams (i.e. the stream keys aren't being registered), we could just remove stream support from the diagram editor and leave it for a follow-up.
- If it's not too difficult to fix the current bugs, the first draft of support for streams could allow users to manually type in the key string of each connection coming out of a stream output. The user would have to know the names of the stream outputs, but at least a roundtrip of uploading a diagram and then re-exporting it would work correctly.
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
I mistakenly thought that stream outputs and only connect to stream outs. It should be fixed now. |
Signed-off-by: Teo Koon Peng <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an excellent first release for the diagram editor! I think any remaining follow-up items can be addressed in incremental PRs.
Signed-off-by: Michael X. Grey <[email protected]>
New feature implementation
Implemented feature
This still needs more testing before I would consider it stable, but I thought this is a good time to merge to main.
Even though the change is huge, most of the changes is in
diagram-editor
so there shouldn't be much conflicts.GenAI Use
We follow OSRA's policy on GenAI tools
Generated-by: Gemini