Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Node-RED has used D3 since day one of its existence. The original structure of the view code was based on a D3 example (can't track down the actual one, but was similar to https://observablehq.com/@d3/force-directed-graph).
Whilst it has remained quite fundamental to how
view.js
works, there is something to be said for phasing out its use. There are optimisations we can make in the code if we aren't having to work in the d3 way.We're also on an ancient version of d3. Faced with the choice of phasing out its use, or upgrading across multiple major version changes, I want to explore the former.
This PR is a work-in-progress towards that goal.
There are a handful of places where we use d3 for no reason other than it was convenient at the time - and vanilla javascript is more than good enough. That's where I'll start.