Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to rename inputs and outputs for individual nodes #15

Open
Tracked by #70
maximecb opened this issue Jun 28, 2021 · 6 comments
Open
Tracked by #70

Ability to rename inputs and outputs for individual nodes #15

maximecb opened this issue Jun 28, 2021 · 6 comments
Assignees

Comments

@maximecb
Copy link
Owner

One of the issues right now, when creating modules, is that the inputs and outputs get assigned generic names ie in0, in1, out0, out1. This is obviously not very descriptive. If you combine a set of nodes into a module, you might not even know which input is which.

One solution is to allow renaming ins and outs for modules. However, that still has the problem that you might now know which in/out is which when renaming them. So I was thinking, maybe the better solution is to allow renaming ins/outs not just for modules, but for every type of node. That way, before you group nodes into a module, you could rename their ins/outs. Then, when creating the module, it would use the in/out names of the nodes for the in/out names of the module. This would fix the problem of being able to figure out what is what 🤔

@maximecb maximecb added this to the MVP milestone Aug 5, 2021
@alexlitty
Copy link
Collaborator

Semi-related question -- I'm noticing that most created modules aren't producing any visible inputs/outputs, is that the current expected state? Or am I perhaps creating modules incorrectly?

@maximecb
Copy link
Owner Author

maximecb commented Aug 28, 2021

When creating a module, it only creates inputs for ports that are already connected in the graph. That way, it doesn't list all the input ports that aren't actually connected (which there could potentially be many).

I just had an idea for the input and output rename: at first I was thinking we'd need to put this in the node parameter dialog. However, something that could be much simpler, is to just make the in/out port names on nodes <input type="text">. This is what's currently done for the project title in the bottom-right corner of the window. You can just click and edit the title. We could do the same for node inputs and outputs 🤔. Though a potential problem is that some port names are currently the empty string.

Maybe we could add an action SetPortName(nodeId, side, portIdx, name) to store the in/out names in the node state.

@maximecb
Copy link
Owner Author

maximecb commented Nov 1, 2021

My plan right now is to change the schema of nodes so that each node has an array of strings, inNames and outNames. That will make it fairly trivial to implement the renaming.

@maximecb
Copy link
Owner Author

Currently working on adding inNames and outNames for each node. Looks like it shouldn't be too difficult. I'll probably also create a converter script to go from the old node schema format to the new.

@maximecb
Copy link
Owner Author

I've completed a converter.js script and changed the schema for projects uploaded on the server so that all nodes have inNames and outNames. It's good to see that this wasn't too hard to do because we may want to change the schema again in the future. I'll proceed with creating new actions to change node input and output names next :)

@maximecb maximecb changed the title Ability to rename ins and outs for individual nodes Ability to rename inputs and outputs for individual nodes Nov 20, 2021
@maximecb maximecb removed this from the MVP milestone Nov 20, 2021
@maximecb
Copy link
Owner Author

maximecb commented Dec 4, 2021

I've implemented the SetInName and SetOutName actions. Now we need a way to edit the input and output names in the UI. Slight complication because some input and output names are the empty string, so we can't just click on the names to edit them.

@maximecb maximecb self-assigned this Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants