The objective of this idea is to have a little more control over how wires are visually router so that they can be arranged a little more neatly.
Like adding a waypoint on a Google Maps route, you could double-click a wire to add a tie-down, which would be represented as a dot. You could drag the dot anywhere and the wire would have to pass through it.
To delete the tie down, click it and press delete.
You can get a 'little' control over wire positioning depending on how much work you want to put into it.
You can install node-red-contrib-noop, set the Appearance to hide the label (text), and choose a 'neutral' icon to make it more correct for this purpose.
Copy / paste as many as you need - especially using the Group feature - and it can add to the visual appeal.
No-op nodes simply pass the messages along - they do not do ANY processing.
This ONLY works well for vertically-placed nodes due to the left-to-right layout of Node-RED itself. Yes, there have been MANY discussions on allowing flows to contain both horizontal and vertical connections. Personally, I think it would be cool to allow entry/exit points from nodes on the screen to be either vertical or horizontal, which would solve this for you, but not likely to happen soon / ever.
There have been several 'alternate' versions of NR created that do this but I don't think it's on 'The Plan' for core BR.
The ties element appears in the origin node. In it you have the destination node id as a key (so you can put ties on multiple outgoing wires individually). Its value is an array of points, in order from the origin node to the destination node.
The runtime would simply ignore this data, unlike an intermediary node that it would have to iterate through. The editor presumably already reads the wires array as it's drawing the lines, and this places the ties information conveniently right next to it.
...But maybe it does clog up the flows file too much to be worth it. I don't know...
You could also use a similar structure but instead of a series of x and y points, you could set a series of x or y planes. I'm thinking about a diagraming tool like Whimsical, where the lines mostly travel horizontally or vertically, and you can drag segments side to side or vertically to change the routing.
I think I would prefer that wire design, where the only curves you would see would be rounded corners and the lines are otherwise straight. I'm probably proposing something that would be way more work now...
The only reason I used no-op was to get the neutral gray colour I preferred. This makes it look less like an 'active component' and more like background wiring to me.
Change nodes are yellow and I don't know of an option to change the colour (maybe I missed it). I use change nodes frequently and in my mind they 'always do something'. When displayed with no label I instinctively hover over them to remind me of their function. Then I'd get the 'change: 0 rules' hover text.
As always: unbounded thanks for writing node-red! We have a team of 10 people using it daily and it replaced tools that we spent > $80,000 / year with more functionality.
Disclaimer: what follow is just a simple proof of concept to play around with the user interaction. It could turn into something. It could turn into nothing. There's plenty about it I like, and a few things I don't. But for a couple hours tinkering on a Saturday evening, I thought it worth sharing.
At the risk of really annoying you - I don't suppose there could be an option to add a "name" to the junctions that would appear under them? Being able to annotate wires is something that would be really useful.
Tonight's goal was to experiment with the user experience of adding junctions to the flow. It is far from a full implementation that can start considering the creeping list of features I'm sure you'll all start asking for.
For an evening, wow, it's pretty amazing! The main limitation I see right now is how the wires follow the same rules as nodes in terms of how they enter and exit at the left and right. So it won't work great for routing wires to the left, I think.
Well, since you mention it
Those new points looks like they could be attached to so for example input exit could be pinned to a new dot that would go to all debug nodes. Currently I'm using empty function node as a proxy for connection "many to many" and maintain one wire between them.
But yeah, from working PoC to final version there is always a bumpy road
I like the concept Nick. Also usfull on the i put to a node which has a lot of feeds, then you want a debug noded added to monitor what goes in.
Ticks the boxes..
1 it does nothing to flows other than amalgamate to a single wire.
2. It is small.. aka a dot big enough to see but takes little visual real estate.
It has my vote.