diff --git a/README.md b/README.md index c29c50e..8484399 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,23 @@ Graph Edge Notes is an Obsidian plugin that overlays short relationship labels on graph-view edges. +## Demo + +### Graph view + +![Graph edge notes color demo](docs/assets/graph-colors-demo.gif) + +### Frontmatter setup + +![Graph edge notes config demo](docs/assets/config-demo.gif) + ## What it does - Reads note-to-note relations from frontmatter. - Renders each relation label on the matching graph edge. -- Shows optional detail text when you click a label, and closes it when you click anywhere outside the popup. +- Shows optional detail text when you hover a label. - Adds a command to create a new relation for the current note. -- Supports a plugin-level default label color and per-relation YAML color overrides. +- Supports a plugin-level default label color. - Includes an optional debug panel that shows recent plugin actions and the current graph binding state. - When debug mode is enabled, the plugin also writes recent debug events to `.obsidian/plugins/graph-edge-notes/debug.log` and removes that file again when debug mode is turned off. @@ -16,21 +26,30 @@ Graph Edge Notes is an Obsidian plugin that overlays short relationship labels o ```yaml relations: + - '("limited-open")[[Open]]("finite-population open model")' + - '("gossip")[[Communication]]' +``` + +The command palette editor currently saves relations in the string form above. + +Object-style YAML is also accepted when reading existing notes: + +```yaml +relation: - target: "[[Open]]" label: "limited-open" detail: "finite-population open model" - color: "#f59e0b" - - target: "[[Communication]]" - label: "gossip" ``` -`label` is what appears on the edge. `detail` is optional and appears in the click popup, where the text can be selected and copied. `color` is optional and overrides the plugin's default label color for that relation. +`label` is what appears on the edge. `detail` is optional and appears in the hover tooltip. + +The frontmatter property name is configurable in plugin settings. In the examples above, `relations` and `relation` are both valid if your plugin setting is configured to match that property name. ## Important limitation The plugin annotates edges that already exist in Obsidian's graph. It does not create new graph edges by itself. In practice, this means the two notes still need to be linked somewhere in the vault for an edge to appear. -Rendered labels are clickable for viewing relation detail. Edit relations through the command palette command **Add graph relation to current note** or by editing frontmatter directly. +Rendered labels show relation detail on hover. Edit relations through the command palette command **Add graph relation to current note** or by editing frontmatter directly. ## Development diff --git a/docs/assets/config-demo.gif b/docs/assets/config-demo.gif new file mode 100644 index 0000000..9a6fc80 Binary files /dev/null and b/docs/assets/config-demo.gif differ diff --git a/docs/assets/graph-colors-demo.gif b/docs/assets/graph-colors-demo.gif new file mode 100644 index 0000000..d27741d Binary files /dev/null and b/docs/assets/graph-colors-demo.gif differ diff --git a/manifest.json b/manifest.json index 28b6c7e..84d243f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "id": "graph-edge-notes", "name": "Graph Edge Notes", - "version": "0.3.0", + "version": "0.3.1", "minAppVersion": "1.5.0", - "description": "Display and edit short relationship labels on Obsidian graph edges.", + "description": "Display and edit short relationship labels on graph edges.", "author": "zane", "isDesktopOnly": false } diff --git a/package.json b/package.json index 9d03688..4b12ad2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "graph-edge-notes", - "version": "0.3.0", - "description": "Editable edge annotations for the Obsidian graph view.", + "version": "0.3.1", + "description": "Editable edge annotations for the graph view.", "scripts": { "dev": "node esbuild.config.mjs", "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production" diff --git a/versions.json b/versions.json index 361f85c..be5e7c4 100644 --- a/versions.json +++ b/versions.json @@ -17,5 +17,6 @@ "0.2.4": "1.5.0", "0.2.5": "1.5.0", "0.2.6": "1.5.0", - "0.3.0": "1.5.0" + "0.3.0": "1.5.0", + "0.3.1": "1.5.0" }