Migrate D3 v3 to v7: update arf.js, index.html, and CI

- Replace d3.layout.tree() with d3.tree()
- Replace d3.svg.diagonal() with d3.linkHorizontal() (x/y accessors swap coords)
- Replace d3.json(url, cb) with d3.json(url).then(cb)
- Replace d3.hierarchy() for root node; use .descendants() and .links()
- Strip svg: namespace prefixes from append/insert calls
- Update xlink:href to href on anchor elements
- Update data accessors to use d.data.name, d.data.url, etc.
- Fix .style("fill") call (was malformed in v3 code)
- Update event handler signature to (event, d) for D3 v7
- Use node.merge(nodeEnter) and link.merge(linkEnter) for v5+ update pattern
- Add public/js/d3.min.js (v7.9.0) copied from node_modules
- Update index.html to load d3.min.js instead of d3.v3.min.js
- Update CI smoke test to check for d3.min.js
- Keep d3.v3.min.js in place until visual parity confirmed

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
s0lray
2026-03-23 17:28:56 -04:00
co-authored by Paperclip
parent 26142302ec
commit 82a9c32850
4 changed files with 31 additions and 25 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ jobs:
fi
}
check_asset "css/arf.css"
check_asset "js/d3.v3.min.js"
check_asset "js/d3.min.js"
check_asset "js/arf.js"
check_asset "arf.json"