PyWorkflowApp / visual-programming

A Python Visual Programming Workspace for Data Science
MIT License
31 stars 12 forks source link

Allow use of local flow nodes #82

Closed reddigari closed 4 years ago

reddigari commented 4 years ago

Rather than set up a new custom class to represent flow ports (which involves some react-diagrams headaches), I just used the existing VPPortModel and indicate the flow port by name. The CustomNodeWidget finds it and renders/styles it separately from the other input ports. Should be fine since there is exactly one per node.

reddigari commented 4 years ago

I did mean to implement the canLinkToPort method but as you said it gets a little complex. The port does know its node (port.getNode()), but all the combos of in/out/flow/data gets messy.

I think I can wrangle the output flow ports to match the input flow (purple circle on the right), but I'm not positive.

reddigari commented 4 years ago

The rendering issues are definitely included in my react-diagrams headaches. Even if canLinkToPort returns false, you're left with a dead link somewhere near the port, and I have had no success figuring out how to "cancel" the rendering of the link. I know @cesaragv fixed a lot of this, e.g. when you click a port, you no longer get a random link up to the corner. However if you look closely, clicking a port does result in the END of a link in the top left corner, so we have a lot of link-rendering bugs that could ideally be cleaned up (but we almost definitely don't have time for).

reddigari commented 4 years ago

I have no idea how to prevent the rendering of invalid links, so we might just want to call this done.

Screen Shot 2020-05-06 at 5 11 27 PM