Make the comment node into a true node

Just a simple node that does nothing; pass everything on the input to the output. This would allow in-line comments which could be helpful in complex flows.
comment3

Not sure it's worth the effort.

You could....

Use a function node that returns msg.

Or a switch node set to something that always evaluates to true.

Or simply place a comment node over the top of the wire?

You could also simply just name the gate 2 node as you've named the comment?

In a complex flow, putting comment nodes on top of wires just gets more messy. And since you can't attach the comment node to a wire, it doesn't move well like normal nodes that drag the wires with them.

That sort of works, but I would rather the comment node to always be white. And a comment node. I frequently put more notes or a bigger description of what I am doing in the edit field of a comment node.
If it's a comment node, then you can tell at a glance that the node is a comment node- because it's a white node.

V1.1.0 is not too far from release. There is a new grouping feature with custom colour and better text comments support.

Hang fire a little while.

I doubt this will happen. It doesn't make sense to me at least. I think the upcoming node grouping feature will help a bit with this as you can visually group a comment as part of a group. I can understand your concern for this though. I almost never use comment nodes as it bothers me visually to have the boxes just floating nearby...

1 Like

Again you beat me with just a tiny bit with a similar answer. I blame answering on a tablet, using the virtual keyboard! :slightly_smiling_face:

2 Likes

Why not use an empty subflow ?

You can style it with whatever color and icon you want.

subflow

4 Likes

Just to visualise @Steve-Mcl idea for you - use an empty function node with no code in it

with changed icon

Also, I often use empty function nodes as simple wire joiner/expanders

image

[edit]

Love it :slight_smile:
[/edit]

and don't forget you can also add hover-over labels on node pins as well to help remind you what they do.

1 Like

The fan node does what you want now.

Fan node

4 Likes

Except that isn't the purpose of a function node. Whereas a comment node's purpose is to provide comments. Inline comments would be useful however.

Also keep in mind that using a function node for that purpose would introduce a small overhead because the code is executed using the vm module. Albeit just for returning the message unchanged...

I'd go for the subflow solution or the group feature coming in 1.1.

Not the fan node?

:wink:

1 Like

Personally, I prefer the solution that doesn't require extra nodes. :smile:

Yeah, and I do agree in a lot of ways.

I just found the fan node handy when I am making routines the fan node is a good in and out point.

And as per it's original design it allows a lot of wires to be joined together and make the flow a lot tidier than without that node. So I get a win win scenario.

Originally it didn't support names/comments as it does now. Only after I sent off a couple of requests to the writer did he add this option.

So, I sort of have a bit of a skewed perspective on the node. But it does (now) have the extra functionality to allow names and comments.

(From above: routines....)
Blocks of nodes arranged and definitive in and out node points.

I'm warning to the idea of the fan node....

... but I'm thinking - lets make node-red-contrib-null :slight_smile:

It would do nothing other than pass the msg along

Should have presets so it could be used as a fan with label showing , fan without label showing and comment

And anything else people come up with

Should allow for easy colour change

I understand people like to create nodes for every edge case, but often it ignores what is easy to do with the core set.

The fan node for example - can just be a Change node with no rules configured in it. Has the added benefit that everyone has that node already and doesn't make it harder to share flows with others.

Should allow for easy colour change

Nodes cannot change their colour - that is a particular feature of Subflows.

2 Likes

Can this not be added to the Comment node? If we are still talking comments.