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

disabled:true #30

Open
sroussey opened this issue Feb 7, 2024 · 6 comments
Open

disabled:true #30

sroussey opened this issue Feb 7, 2024 · 6 comments

Comments

@sroussey
Copy link
Contributor

sroussey commented Feb 7, 2024

Sometimes you just want to show the data!

@clarkmcc
Copy link
Owner

Makes sense. How do you feel about the how components look visually when they're disabled. For example inputs are greyed out, should nodes be greyed out? What about custom inputs that maybe can't be greyed out.

Alternatively we could maybe just disable all state updates and the graph would look the same but nothing would change.

@sroussey
Copy link
Contributor Author

I think we pass the disabled property down and don't make is a optional param. The default would be however the input UI elements handle disabled, which is usually to grew out, etc. We can also add a disabled class on the top div and people can choose their own adventure on how to have the whole node deal with it.

@sroussey
Copy link
Contributor Author

I think the bigger issue is do we do things that disable connecting, etc.

I don't think a full state update block is a good idea since it may be disabled but still change. For example, if I have a node task and it is running, then the inputs / outputs should be disabled from changing (including connecting handles), but as the task runs it might change the node data to represent what is going on.

@clarkmcc
Copy link
Owner

I'll do some research on disabling connections and then take a stab at this.

@sroussey
Copy link
Contributor Author

In HTML, btw, there are two ways to prevent editing: readonly and disabled. People use readonly less often (no real ui feedback unless you try to edit), and more often use disabled. In theory, disabled is a superset of readonly.

@clarkmcc
Copy link
Owner

Okay, it looks like we can use nodesConnectable property to disable editing connections.

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