Skip to content
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

Latest commit

 

History

History
40 lines (35 loc) · 3.25 KB

ObjectGraph.md

File metadata and controls

40 lines (35 loc) · 3.25 KB
name Library/silverbulletmd/silverbullet-object-graph/ObjectGraph
tags meta/library
files
object-graph.plug.js

Object Graph

An interactive object-graph explorer for SilverBullet. Anchored on the current page, it visualizes objects (pages, items, blocks, …) and the typed relations between them — letting you navigate your space by structure rather than by name.

Commands

  • ${widgets.commandButton("Graph: Explore")} (Ctrl/Cmd-Shift-G): Opens an exploratory graph anchored on the currently open page. Its 1-hop neighborhood is loaded immediately; expand more by clicking ghost nodes.
  • ${widgets.commandButton("Graph: Global Page Map")}: Loads every content page in the space and the mention relations between them, all pre-expanded. Useful for a bird's-eye view; toggle other relation labels on from the sidebar to bring in further edges without a refetch.

Interacting with the graph

  • Click a translucent (ghost) node to expand its 1-hop neighborhood into the graph.
  • Click an expanded (solid) node to select it — its attributes appear in the sidebar's Object section.
  • Double-click any node to navigate to it (pages, items, and blocks open in the editor; URLs open externally).
  • Double-click an edge to navigate to the source of that relation (the page + position where the link / attribute lives).
  • Hover an edge to see its label and snippet.
  • Drag a node to pin it; the layout reflows around it.
  • Hover dims everything outside the node's neighborhood.
  • Scroll / pinch to zoom; drag empty space to pan.
  • Esc or the × button closes the modal.

Panels

  • Header — buttons for Expand (open every visible ghost in one batch), Collapse (reset the explored set to the selected object + its 1-hop), and a Hide labels checkbox to suppress edge labels on dense graphs.

  • Left — Sidebar.

    • Root tags — toggle visibility by structural object kind (page, item, task, block, …).
    • Tags — toggle visibility by user tag. Untagged objects share an (untagged) bucket.
    • Relations — toggle typed edge labels (mention, co-mention, custom relation types, …). co-mention is hidden by default in Explore mode; only mention is visible by default in Global Page Map mode.
    • Object — the selected node's full indexed attributes rendered as YAML. Click the title to navigate to the object. The × button (or Delete / Backspace while the node is selected) removes the node from the graph.

    Each filter section has all / none shortcuts, a search box when the list is long, and shows counts from the current graph.

Visual conventions

  • Solid circles — expanded nodes (their 1-hop neighborhood is loaded).
  • Translucent circles — ghost nodes; click to expand.
  • Dashed outline — dangling refs (referenced by some relation but not yet indexed).
  • Color is driven by the node's primary user tag, auto-derived from the tag name. Untagged nodes use a neutral gray.
  • Edge labels are typed relation names (or the raw kind like mention when no type is set), drawn along the edge. Directed edges carry an arrowhead at the target; relations that connect the same pair in both directions get arrows at both ends; collapsed co-mention pairs are rendered undirected.