Often I need to connect the outputs of multiple nodes to one input of another node in the node-red web editor. This is currently quite tedious as I have to drag & drop a line from each output to the target node's input.
I work in engineering and am a user of Mathworks' Simulink. There block outputs can be comfortably connected by selecting source blocks and then Ctrl+Right clicking the target block. That function I would like to see in node-red, indeed!
It would also make connecting a single block to another block more convenient as a well aimed drag & drop isn't needed necessarily anymore.
Is it only me or could the user experience be improved this way?
Holler at me if I can help building a prototype. I'm not entirely new to building stuff for node-red.
@knolleary Is it reasonable if I create an implementation for this feature I proposed and then create a pull request on the dev branch (while adhering to the contribution guide) or is that particular feature unsuitable/inappropriate for node-red as nobody else has been wanting it?
I'd like to get a short heads up before I start doing anything that may be in vain
My first idea would be having a command on the keyboard shortcut list that works the other way round than "wire-node-to-multiple", i.e. having "wire-multiple-to-node" that connects outputs of selected nodes to the input of the lastly selected node.
As proposed in my first post I added the "Ctrl+RMB" gesture to quickly connect nodes with one-another prototypically to node red.
And oh boy, it feels good and intuitive to use! Here is a short screen capture of the functionality in action:
I feel like this small change could dramatically improve user-friendlieness. I suggest you try it yourself! I pushed it to my fork on github on the feature-editor-quickConnect branch.
What do you think?
The implementation basically uses the same code I implemented for the PR for the wire-multiple-to-node keybinding but lives in editor-client/src/js/ui/view.js. Is there a common place where such functionality could be put into?
Edit: I should probably have opened this topic in "Core development"... silly me. Can someone move it?
Are you aware you can already wire two nodes by ctrl-clicking on port, keeping ctrl pressed and then click on the node to connect to? No need to drag the mouse at all.
If you keep ctrl held, you can then click on the next node in the flow to wire in. It's more geared up for wiring a series of nodes then multiple to one, so a bit different to this, but the idea is there.