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

Custom node content #3

Open
joeltg opened this issue Sep 30, 2021 · 1 comment
Open

Custom node content #3

joeltg opened this issue Sep 30, 2021 · 1 comment

Comments

@joeltg
Copy link
Owner

joeltg commented Sep 30, 2021

One great feature would be to allow users to add a custom React component to each node kind to render custom body content. Until Safari fixes its foreignObject implementation, the component would have to only render SVG elements, but that still seems useful.

Right now all the nodes are fixed-size. The simplest version of this would keep the fixed node dimensions, and leave it up to the user to not overflow them. A slightly better version of this would leave it up to the user to compute each node's dimensions individually. And ideally we would automatically find a bounding box of the user's custom SVG content and dynamically resize the node to fit.

I'll let these options sit for a while and come back to this later. If anyone has ideas feel free to being them up.

@thadk
Copy link

thadk commented Nov 19, 2021

For another project, I just implemented a dataflow graph much quick/dirtier than yours, but also including the custom React components using https://reactflow.dev/examples/custom-node/ — I may look to refactor with aspects from both now that I've seen react-dataflow-editor's approach. The aim of the project is to allow domain expert to make specific updates to a bit of a large knowledge graph.

Nice job, and thanks for the detailed writeup which caught my eye to bring me here via Knowledge Futures and Twitter.

IsaacHook added a commit to IsaacHook/react-dataflow-editor that referenced this issue Mar 4, 2022
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