I'm operating with subflows that have a number of output's. I usually give those outputs a name - simply for documentation purposes (in the main flows). Within the subflow I have to use an (additional) comment node to show this given name next to the output:
Wouldn't it be better to show the name of the output as the label of the output node - similar to all other nodes?
Any opinions to this proposal?
I'd try to create a PR if this is of interest for the community...
@bakman2 this is a question about the subflow port nodes, not link nodes.
@ralphwetzel that's a good idea. I do wonder if it should still have the port number as well. Definitely worth mocking up a concept for. If you are interested in working on a PR, I can help give you some pointers to the right bits of view.js to look at.
Hello Nick,
thank you for your feedback.
After some time with the code I see two ways to implement this:
Treat subflowOutputs (as well as subflowInputs and subflowStatus) as a special type of node(s) and handle them - as currently implemented - in a dedicated section of the code. This will continue the current path of copy/pasting a valid share of code from the standard implementation to handle these special types...
Treat subflowOutputs & the others (for the matter of drawing those nodes) as a standard node (perhaps with a special procedure regarding the icon). This could reduce code bloating ... and should make the maintenance easier later. It yet would need adaptations in more corners than just the drawing code.
Personally, I'd probably stick with 1 until it became overwhelming obvious that a larger refactoring was needed.
Off the top of my head, I can see the subflow nodes don't have icons or annotations (the changed/error markers) - so there would have to be lots of special cases added throughout the node drawing node.
I think the code that calculates the label width is fairly self contained and easily reused for the subflow nodes.