feat(vscode): lay unplaced nodes out with ELK and route edges around boxes - #535
Merged
Merged
Conversation
…boxes Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What and why
Nodes the model does not place took slots in a √n grid, and every edge ran straight from centre to centre — across whatever boxes lay between. The pilot visualizer gets its tidy diagrams from Graphviz; the panel now gets the same from ELK (elkjs, bundled into the webview): layered placement and orthogonal edges routed around the boxes.
A node the model places, or one the user drags, is still drawn exactly where stated, and edges at it run straight (ELK's route was computed around its old place). Renderings beyond 600 nodes keep the grid so a large migrated model does not hang the panel.
skipLibCheckis enabled in both tsconfigs because elkjs's own.d.tsdoes not compile under this project's strict options (same settingeditors/syson/frontendalready uses).dist/webview.jsgrows from 48 KB to 3.5 MB (the ELK engine).How it was verified
npm --prefix editors/vscode run typecheck,npm --prefix editors/vscode test(184 pass; newautolayout.test.tscovers DOWN/RIGHT ordering, orthogonal segments, anchors on borders, nested containers with root-relative edge coordinates, skipped self-loops/explicit routes, kind and size limits;layout.test.tscovers auto vs model vs gesture precedence).python3 scripts/changelog.py check,make vscode-package.Layoutand its edges go straight while the rest stay routed.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelog