Skip to content

okf viewer: click-to-focus and hierarchy breadcrumb/siblings (convention-free UX)#138

Open
Gabriel-Hong wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Gabriel-Hong:feat/viewer-ux
Open

okf viewer: click-to-focus and hierarchy breadcrumb/siblings (convention-free UX)#138
Gabriel-Hong wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
Gabriel-Hong:feat/viewer-ux

Conversation

@Gabriel-Hong

Copy link
Copy Markdown

Implements #137.

Two small, convention-free enhancements to the reference viewer — no new frontmatter, no spec change, no generator.py change.

image

Click-to-focus — clicking a concept fades the rest of the graph by hop distance from that node (0–1 hops bright, 2 medium, 3+/unreachable faint), so "what connects to this" is obvious at a glance without losing context. Clicking empty canvas or Reset view restores. Built on the existing .dim class and Cytoscape's BFS.

image image

Hierarchy orientation — the detail panel gains a breadcrumb from the concept-id path (e.g. references / metrics / event_count) and an "In this group" list of sibling concepts in the same directory; both clickable.

Scope

  • Changes limited to viewer/static/viz.js, viewer/templates/viz.html, viewer/static/viz.css (+122/-4).
  • generator.py and the graph-data format are untouched — the existing pytest viewer suite passes unchanged and viz.js passes node --check.
  • Existing bundles render identically until a node is clicked.

How to try

python -m reference_agent visualize --bundle ./bundles/ga4, open the result, and click a node.

…ion-free)

Two convention-free navigation aids, independent of the edge-detection work
in GoogleCloudPlatform#48/GoogleCloudPlatform#66/GoogleCloudPlatform#110 and requiring no new frontmatter:
- Click-to-focus fades the graph by hop distance from the clicked node
  (0-1 hops bright, 2 medium, 3+/unreachable faint).
- The detail panel gains a concept-id breadcrumb and an "In this group"
  list of sibling concepts in the same directory.
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.

1 participant