-
Notifications
You must be signed in to change notification settings - Fork 743
[Graph-] Selection Panel #1556
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
base: main
Are you sure you want to change the base?
[Graph-] Selection Panel #1556
Conversation
…ection [Graph-] Added neighbour depth slider & refocus speed slider
riccardoferretti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I left a few comments, let me know your thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the graph visualization panel with new selection controls that give users fine-grained control over graph interaction behavior. It introduces UI sliders for neighbor highlighting depth and refocus animation speed, along with toggles to disable automatic zoom and refocus when selecting nodes.
Key Changes:
- Added "Selection" folder to dat.GUI with four new controls: Neighbor Depth slider (1-5), Refocus Speed slider (0-3000ms), Disable Refocus toggle, and Disable Zoom toggle
- Refactored focus nodes/links computation to use configurable neighbor depth instead of hardcoded single-level neighbors
- Fixed null reference error in dataviz.ts by adding panel existence check before posting configuration update messages
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/foam-vscode/static/dataviz/graph.js | Added Selection panel GUI controls, implemented getNeighbors() function for configurable depth traversal, refactored focus computation to use neighbor depth, and conditionally apply refocus/zoom based on user settings |
| packages/foam-vscode/static/dataviz/graph.css | Removed custom width constraints on dat.GUI controls to accommodate new slider controls |
| packages/foam-vscode/src/features/panels/dataviz.ts | Added null check to prevent errors when configuration changes before panel creation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…sDurationSlider to better reflect the underlying mechanism.
…avoid double negatives
…yle rules for UI controls
d3bb75d to
4b9159a
Compare
|
Sorry I should have clarified from the beginning that I don't expect copilot's comments to be always followed through with. |
…ture being implemented
Ok, good to know. Some good points were made by the AI though, will keep it's suggestions in mind next time. |
[Graph-] Added toggles to disable zoom & refocus movement on note selection
[Graph-] Added neighbour depth slider & refocus speed slider
Disable refocus and disable zoom, temporarily disable automatic refocusing and zooming when changing to a different node/note.

Refocus speed speeds up or slows down the speed with which the graph refocusing animation moves to a new node.
Neighbor Depth: controls the number of neighbours highlighted around the selected node