# Make the comment node into a true node

**URL:** <https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733>\
**Category:** Core Development\
**Created:** [3 June 2020 20:45 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733 "2020-06-03T20:45:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [3 June 2020 20:45 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/1 "2020-06-03T20:45:02Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4adf64e9c69c6c63bfc4ace0545c5450626169e2.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 June 2020 20:56 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/2 "2020-06-03T20:56:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [3 June 2020 20:57 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/3 "2020-06-03T20:57:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [3 June 2020 21:01 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/4 "2020-06-03T21:01:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [3 June 2020 21:04 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/5 "2020-06-03T21:04:30Z")

</div>

> [@Steve-Mcl](#):
>
> 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?

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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 June 2020 21:10 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/6 "2020-06-03T21:10:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [3 June 2020 21:14 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/7 "2020-06-03T21:14:02Z")

</div>

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...

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [3 June 2020 21:15 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/8 "2020-06-03T21:15:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [3 June 2020 21:16 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/9 "2020-06-03T21:16:55Z")

</div>

Why not use an empty subflow ?

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

![subflow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0a882e8094c1dd9cc9459e248b7de7ec7505af5a.png)

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [3 June 2020 21:34 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/10 "2020-06-03T21:34:18Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/5/d55e681ad1bb8b5bb9b9c1b713a52aa5f184a235.png)

with changed icon

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/65a86c522f98882d833260b814070ef368861e30.jpeg)

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

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/543f74f1919ce5fef65ae1a25a747620a9c49ebc.png)

[edit]

> [@Andrei](#):
>
> Why not use an empty subflow ?

Love it 🙂  
[/edit]

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 June 2020 21:37 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/11 "2020-06-03T21:37:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [3 June 2020 21:39 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/12 "2020-06-03T21:39:43Z")

</div>

The `fan` node does what you want now.

[Fan node](https://flows.nodered.org/node/node-red-contrib-fan)

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [4 June 2020 04:03 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/13 "2020-06-04T04:03:40Z")

</div>

> [@cymplecy](#):
>
> Just to visualise @Steve-Mcl idea for you - use an empty function node with no code in it

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.

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [4 June 2020 04:48 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/14 "2020-06-04T04:48:40Z")

</div>

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](https://nodejs.org/dist/latest-v10.x/docs/api/vm.html) module. Albeit just for returning the message unchanged...

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

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 June 2020 04:58 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/15 "2020-06-04T04:58:23Z")

</div>

Not the `fan` node?

😉

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [4 June 2020 05:00 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/16 "2020-06-04T05:00:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 June 2020 05:04 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/17 "2020-06-04T05:04:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 June 2020 08:30 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/18 "2020-06-04T08:30:57Z")

</div>

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

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

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

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 June 2020 08:42 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/19 "2020-06-04T08:42:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [4 June 2020 09:17 UTC](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733/20 "2020-06-04T09:17:48Z")

</div>

> [@cymplecy](#):
>
> ... but I'm thinking - lets make node-red-contrib-null

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

[Next page](https://discourse.nodered.org/t/make-the-comment-node-into-a-true-node/27733.md?page=2)
