# Flippable node wiring direction

**URL:** <https://discourse.nodered.org/t/flippable-node-wiring-direction/56937>\
**Category:** Feature Requests\
**Created:** [19 January 2022 21:53 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937 "2022-01-19T21:53:49Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![r0ller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/r0ller/32/14327_2.png) [@r0ller](https://discourse.nodered.org/u/r0ller)\
**Post date:** [19 January 2022 21:53 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/1 "2022-01-19T21:53:49Z")

</div>

Hi All,

Would it be an easy to develop feature to make wiring direction flippable at a certain node? Currently, if you have a number of nodes in multiple rows, then the wiring goes always left to right like:

```auto
A->B->C---|
-----------
|->D->E->F

```

So after node C, the wiring turns back and goes to the left to be able to connect to D. However, if it was possible to flip the direction of wiring for node D so that the input port is displayed on its right and the output port(s) are displayed on its left, we could have something like this:

```auto
A->B->C--|
F<-E<-D<-|

```

Sorry for the schematic flows but I hope you get the jist. Once a wiring is flipped at a node, it'd remain like that for all nodes after it till the wiring is flipped again. This could result in cleaner and more transparently displayed flows I think. What do you think?

Best regards,  
r0ller

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [20 January 2022 02:10 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/2 "2022-01-20T02:10:51Z")

</div>

I totally agree, we should be able to connect the ports at different positions of a node. I think to avoid confusing between IN and OUT, it will be even better to have an option of an arrow head, which will TELL the node the DIRECTION of flow. Also better to have PORTS at top and bottom as well

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

---

<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:** [20 January 2022 07:48 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/3 "2022-01-20T07:48:57Z")

</div>

This has been discussed a few times before and the conclusion has always been this isn't something we want to do.

It would get super confusing if the flows can go in any direction. If you were zoomed in to a part of a flow, you'd have no idea what direction it was running in.

Arrow heads would help (and there is a PR in the works that will add an option to display arrow heads). But I still think switching directions like this would be confusing.

---

<div class="post-metadata">

**Author:** ![r0ller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/r0ller/32/14327_2.png) [@r0ller](https://discourse.nodered.org/u/r0ller)\
**Post date:** [20 January 2022 07:53 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/4 "2022-01-20T07:53:45Z")

</div>

What a pity, I missed those discussions -actually didn't even find them yesterday. I disagree though as I think it'd reduce the number of crossing wires. Nevertheless, I can of course accept your decision.

---

<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:** [20 January 2022 08:00 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/5 "2022-01-20T08:00:48Z")

</div>

And link nodes can help detangle flyback wires from your first pic.

---

<div class="post-metadata">

**Author:** ![OriolFM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oriolfm/32/30710_2.png) [@OriolFM](https://discourse.nodered.org/u/OriolFM)\
**Post date:** [20 January 2022 08:25 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/6 "2022-01-20T08:25:37Z")

</div>

If arrowheads were on by default, it wouldn't be that confusing. If anything, it might help tidy up a bit.

Link nodes are fine, but sometimes about half of the nodes are links back and forth, and that is also very confusing, not being able to see where the wires go on first glance. Links are still super useful for jumping between tabs or between separate parts of the same flow, but for tidying up, it would be great to have the option.

Another thing that would help a lot to tidy up things would be a small branching node, a dot where you could connect wires and would just forward anything that comes in to all the wires in the output, a bit like an empty function node with only "return (msg)" inside.

On occasion, I've found myself having to add a debug node to see what comes on the INPUT of a certain node. This is usually not an issue, but when you have a node with 40+ wires connected at the input, adding such a node implies duplicating a sh\*tload of wires.

In cases like this, the option I usually get is to add an empty function node to gather all the inputs and forward a single wire to the next node. That allows to connect the debug node in between with just one wire. I could also do it with link nodes, but then I have to add two nodes instead of one.

I was thinking of something the size of a deployed link node (the small square) with both input and output, that could be used just to sort out these situations where many wires converge on just one node.

---

<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:** [20 January 2022 08:38 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/7 "2022-01-20T08:38:11Z")

</div>

> [@OriolFM](#):
>
> Another thing that would help a lot to tidy up things would be a small branching node, a dot where you could connect wires and would just forward anything that comes in to all the wires in the output, a bit like an empty function node with only "return (msg)" inside.

We have a proposal for that: [Adding junctions to wires · node-red/designs · Discussion #62 · GitHub](https://github.com/node-red/designs/discussions/62)

It won't be until 3.0 now and we need to consider how to make it somewhat backward compatible - so flows can be shared with older versions of NR with some way of it working - much like we did when we added Groups.

---

<div class="post-metadata">

**Author:** ![OriolFM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oriolfm/32/30710_2.png) [@OriolFM](https://discourse.nodered.org/u/OriolFM)\
**Post date:** [20 January 2022 08:53 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/8 "2022-01-20T08:53:39Z")

</div>

Ooooh I missed that one. I'm very much looking forward to it, I really need my flows to be nice and neat, and that might be a challenge when they get complex.

---

<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:** [20 January 2022 09:02 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/9 "2022-01-20T09:02:50Z")

</div>

> [@OriolFM](#):
>
> Ooooh I missed that one. I'm very much looking forward to it

Hi, I assume you are refering to the " **Adding junctions to wires**" that Nick mentioned (and not the " **flippable nodes**" as the OP requested?)

You can already do this quite easily with an empty change node

e.g...

### Without a junction

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

### Using an empty change node as a junction

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

---

<div class="post-metadata">

**Author:** ![OriolFM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oriolfm/32/30710_2.png) [@OriolFM](https://discourse.nodered.org/u/OriolFM)\
**Post date:** [20 January 2022 09:23 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/10 "2022-01-20T09:23:29Z")

</div>

I was referring to both.

I currently do the same thing you set there with an empty function node, but I assume it has certain overhead and if you need to add/delete it you have to rewire the whole thing. Junctions would solve that.

As for flipping the node direction, things like this could look much better (and would not be confusing if the wires had arrowheads):  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/f/1fd0af4bbffebd448daaf11052740d6c51bd4d44.png)

---

<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:** [20 January 2022 09:31 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/11 "2022-01-20T09:31:09Z")

</div>

> [@OriolFM](#):
>
> if you need to add/delete it you have to rewire the whole thing

Not any more...

![chrome_xnRgD7DXIm](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae350fe62431adb1d954babc2ed47c1566175353.gif)

---

<div class="post-metadata">

**Author:** ![OriolFM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/oriolfm/32/30710_2.png) [@OriolFM](https://discourse.nodered.org/u/OriolFM)\
**Post date:** [20 January 2022 09:51 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/12 "2022-01-20T09:51:45Z")

</div>

WHAT IS THIS SORCERY?

(Thanks, really!)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 January 2022 10:06 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/13 "2022-01-20T10:06:29Z")

</div>

I think that there might be some backwards-compatibility issues in the designs of nodes here since there are references to left/right which make assumptions about left-\>right flows. Certainly some careful testing would be needed to make sure that nodes still made sense visually if the in/out direction was swapped.

Also, how would the decision to "go round the corner" be made? I think it would need some measure of user control at least.

I guess I'm in two minds about this. I think that I've adjusted my flows to deal with the left-to-right flows but then maybe my flows aren't as complex as some people's.

I also think that there are laws of diminishing returns on visual based programming tools. In general, if a flow is getting that complex, it would probably be better to invest in collapsing parts of the flow to a subflow (and maybe the node creator) or making use of the link return features to create separate "functions". Either way, breaking the flow into more manageable sections. In extreme cases, I think you would get to a point where a custom node would be beneficial. Just saying that, just because you start with a visual tool, not everything needs to have the same level of visibility necessarily.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 January 2022 10:20 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/14 "2022-01-20T10:20:10Z")

</div>

> [@TotallyInformation](#):
>
> In general, if a flow is getting that complex, it would probably be better to ...

Absolutely. If a flow is too complex to easily follow then refactor it.

---

<div class="post-metadata">

**Author:** ![deputynl](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@deputynl](https://discourse.nodered.org/u/deputynl)\
**Post date:** [20 January 2022 10:21 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/15 "2022-01-20T10:21:20Z")

</div>

how did you get that dialog? (and I tried CTRL DEL, but it doesn't seem to work for me)

---

<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:** [20 January 2022 10:44 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/16 "2022-01-20T10:44:28Z")

</div>

@deputynl that is the Action List. There is an item in the main menu for it, or you can use the short-cut `Ctrl-Shift-P` (or `Cmd-Shift-P` on MacOs)

The `Delete and reconnect` action being demonstrated there is in the 2.2.0-beta.0 release.

---

<div class="post-metadata">

**Author:** ![deputynl](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@deputynl](https://discourse.nodered.org/u/deputynl)\
**Post date:** [20 January 2022 10:49 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/17 "2022-01-20T10:49:15Z")

</div>

thanks for both parts of that answer!

---

<div class="post-metadata">

**Author:** ![r0ller](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/r0ller/32/14327_2.png) [@r0ller](https://discourse.nodered.org/u/r0ller)\
**Post date:** [20 January 2022 11:45 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/18 "2022-01-20T11:45:16Z")

</div>

That I can only agree with and that's why we introduced using the command object design pattern. However, refactoring comes with retesting 🙂 We did not have enough time to refactor/retest everything and still have some bigger spaghettis which could look better if there was some way to make them cleaner without retesting them.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 March 2022 11:45 UTC](https://discourse.nodered.org/t/flippable-node-wiring-direction/56937/19 "2022-03-21T11:45:30Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
