Conversation
Fetches only when the node config form goes from hidden to displayed, so flow node options are up-to-date.
reelmatt
left a comment
There was a problem hiding this comment.
I think this looks great. All "normal" combinations I tried worked flawlessly, so should be good for a demo.
There were a few bugs I noticed when trying "non-normal" combinations. I had some ideas that seemed easy at first, but got more complicated the more I looked into it—react-diagrams headaches is an understatement! Given the time remaining, I'd probably classify these as "nice-to-haves":
- Flow node output ports should also be purple circles. KNIME also has different shapes/colors for other kinds of ports we're not dealing with. The idea is you can more easily tell what hooks up with what. This seemed the easiest where you could just add make the port's name
flow-out, much like you did with theflow-inports, but at first glance it looks like adding a lot of if/else conditions to test what's what. - Flow nodes should only be allowed to connect to
flow-inports. This also seemed easy at first—you can just modify thecanLinkToPortin theVPPortModel—but it doesn't look like the port knows its parent node which makes it tricky.- Easier temp fix??: the server throws an error if too many edges try to attach to in ports (e.g. try to connect a flow node to a flow port AND a regular port). Can
react-diagramsdelete, or not render, the failed edge? This way the user gets a clearer idea the edge failed than just looking at the console (it says failed, but I see an edge).
- Easier temp fix??: the server throws an error if too many edges try to attach to in ports (e.g. try to connect a flow node to a flow port AND a regular port). Can
|
I did mean to implement the I think I can wrangle the output flow ports to match the input flow (purple circle on the right), but I'm not positive. |
|
The rendering issues are definitely included in my react-diagrams headaches. Even if |

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