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

Looking for usage syntax change by a consumer #2912

Closed
imvetri opened this issue Mar 13, 2023 · 2 comments
Closed

Looking for usage syntax change by a consumer #2912

imvetri opened this issue Mar 13, 2023 · 2 comments

Comments

@imvetri
Copy link

imvetri commented Mar 13, 2023

Please describe the feature that you want to propose

TDLR: code to configuration. configuration catch up, just like webpack.

Mind voice: : I think currently all the examples are separated, and the provided description about the files can be wrapped into an abstract or an interface so that, user like me, a consumer do have to change or create a new file while taking inspiration from the given example, instead, I'd like to just change a json property, examples like auto resize, automatic new node, automatic new handle, automatic backgrounds etc.

Please convert the provided samples in form of configuration enabled so that all examples look like a different configuration instead of looking like different file dependencies.

Behaviour

As an user, I expect to create dynamic handles for a node - number of handles.
As an user, I expect automatic creation of next node when an user clicks, drags, drops an handle - creates one new node, of same type.
As an user, I expect to reduce the node data that gets passed to react-flow to be automatically generated and stored to localStorage when I release, when I reload page, it automatically loads from localStorage.
As an user, I expect to be able to save the configuration of the page after I dynamically create new nodes, from dynamic handles, and be able to reload the configurationin in form of a json file.

P.S, code to configuration is a best practice.

Please feel free to prompt me with your questions if you have doubts.

@imvetri imvetri changed the title Looking for usage syntax change Looking for usage syntax change by a consumer Mar 13, 2023
@imvetri

This comment was marked as spam.

@moklick
Copy link
Member

moklick commented Mar 13, 2023

Hey @imvetri

thanks for your suggestions.

You can already do all the things you described with React Flow. If all those cases would be supported through props we would have to maintain way more complex code. IMHO we have too many props already and should try to strip out some and replace them with components or hooks wich are composable. We try to keep React Flow low level and flexible and this is not possible with your config driven approach. If you want to have something like that you can build it on top of React Flow but the library itself is not the right place for that.

@moklick moklick closed this as completed Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants