-
Notifications
You must be signed in to change notification settings - Fork 743
[Graph-] Added appearance panel (Text fade distance & Node font size) #1555
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?
Conversation
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 adds an "Appearance" panel to the graph visualization with two new controls: "Text Fade" (distance) and "Node Font Size" (multiplier). The Text Fade slider adjusts when node labels become visible based on zoom level, while the Node Font Size slider controls the font size multiplier for node labels. The PR also includes VS Code configuration support for the font size multiplier to persist across sessions.
Key changes:
- Added an "Appearance" folder to the dat.GUI with sliders for text fade distance (0-5) and node font size multiplier (0.5-3)
- Implemented VS Code configuration persistence for
nodeFontSizeMultiplier - Removed restrictive CSS width constraints on dat.GUI controls
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/foam-vscode/static/dataviz/graph.js | Added appearance panel with text fade and font size controls; updated font size calculation and opacity domain; added message handler for font size multiplier updates |
| packages/foam-vscode/static/dataviz/graph.css | Removed fixed width constraints on dat.GUI controls to accommodate new sliders |
| packages/foam-vscode/src/features/panels/dataviz.ts | Added configuration change listener and initialization for nodeFontSizeMultiplier setting |
| packages/foam-vscode/package.json | Added foam.graph.nodeFontSizeMultiplier configuration property with default value of 1 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…sociated calls in datavis.ts
…dler by storing a reference to the controller and then calling its update method
Adds 2 sliders to change the text fade distance so that nodes can be seen when zoomed out, this is useful especially in conjunction with the forces panel which might result in changing of the graph size.
Text Fade Distance


Font Size

