Skip to content

Conversation

@meestahp
Copy link
Contributor

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
textFadeA
textFadeB

Font Size
nodeFontSizeA
nodeFontSizeB

Copy link
Contributor

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants