Skip to content

feat(graph): add collapsible legend with node type visibility toggle#125

Merged
nashsu merged 1 commit intonashsu:mainfrom
haodonLiu:main
May 6, 2026
Merged

feat(graph): add collapsible legend with node type visibility toggle#125
nashsu merged 1 commit intonashsu:mainfrom
haodonLiu:main

Conversation

@haodonLiu
Copy link
Copy Markdown

Summary

Enhance Knowledge Graph legend with collapsible panel, node type visibility toggle, and left-side scrollbar.
增强知识图谱图例面板:添加可折叠功能、按类型切换节点可见性、左侧滚动条。

Changes

File Description
src/components/graph/graph-view.tsx Legend UI enhancement, HiddenTypeManager, state management
src/index.css Custom scrollbar styling for legend

Features

Feature Description
Collapsible Legend Click ▼/▶ to collapse/expand legend panel
Double-click Hide Double-click a node type to hide all nodes of that type
Edge Sync Connected edges auto-hide when nodes are hidden
Show All "Show all" button restores all hidden types
Left-side Scrollbar Scrollbar appears on left side for cleaner layout

Interaction

Action Result
Click ▼/▶ button Collapse/expand legend
Double-click "Entity" Hide all Entity nodes + connected edges
Double-click again Restore visibility
Click "Show all" Restore all hidden types

Breaking Changes

None

Testing

npm run tauri dev
# Navigate to Knowledge Graph view
# Test collapse/expand, double-click hide, scrollbar  

Screenshots

屏幕截图 2026-05-04 203637 屏幕截图 2026-05-04 203609 屏幕截图 2026-05-04 203613 屏幕截图 2026-05-04 203624

@nashsu nashsu merged commit 3c65709 into nashsu:main May 6, 2026
3 checks passed
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