Semantic Map Canvas

by Ryan
5
4
3
2
1
Score: 30/100

Description

Semantic zoom for Obsidian Canvas.

Reviews

No reviews yet.

Stats

1
stars
1
downloads
0
forks
1
days
1
days
1
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
1
total issues
1
open issues
0
closed issues
7
commits

Latest Version

a day ago

Changelog

Semantic Map Canvas 0.0.12

English

This is a regular release (not a pre-release). Phase 13 has passed user acceptance.

New: Auto and manual display modes

Right-click the empty canvas background and open Display mode:

  • Auto (default): follows zoom with the existing hysteresis and highest-level cap.
  • L1 — Map, L2 — Overview, L3 — Structure, L4 — Detail: keep the selected display mode while zooming and panning.

Your selection is saved separately for each Canvas and restored after reopening or renaming it. Manual modes do not change node Semantic levels. Central titles continue adapting to available space. Pausing semantic visibility preserves the selected mode.

Manual modes bypass the highest-level cap: selecting Map without L1 nodes can hide every node. Right-click the background and select Auto or Detail to recover. The menu is also available in native canvas settings.

Installation and upgrade

Requires desktop Obsidian 1.9.14+. Download main.js, manifest.json, and styles.css from this release. Place them in .obsidian/plugins/semantic-map-canvas/ inside your vault, then reload the plugin or restart Obsidian. When upgrading, replace only these three files and preserve data.json.

The interface remains English. Licensed under MIT, with upstream notices retained.

Validation and limitations

Build, lint, 106 automated tests and 36 browser layout scenarios passed, followed by user acceptance in Obsidian. Canvas menus rely on internal APIs; mobile and broad third-party theme/plugin compatibility remain unverified. Very small titles require zooming in, and large canvases may pause briefly during initial rendering.

English guide · Report an issue


简体中文

本次为正式 Release(非 Pre-release)。Phase 13 已通过用户验收。

新增:自动与手动显示档位

在画布空白处右键,打开 Display mode:

  • Auto(默认):随缩放自动调整,保留原有滞回和最高层级限制。
  • L1 — Map、L2 — Overview、L3 — Structure、L4 — Detail:固定所选档位,仍可自由缩放和平移。

每个 Canvas 分别保存选择,重开或重命名后恢复。手动档位不改变节点 Semantic level;中央标题继续适配可用空间,暂停语义显隐也会保留选择。

手动模式不受最高层级限制:没有 L1 节点时选择 Map 可能全部隐藏,空白处右键切回 Auto 或 Detail 即可恢复。画布设置菜单中也可选择档位。

安装与升级

需要桌面版 Obsidian 1.9.14 或更新版本。下载本次 Release 的 main.js、manifest.json、styles.css,放入 vault 的 .obsidian/plugins/semantic-map-canvas/,然后重新加载插件或重启 Obsidian。升级时仅替换这三个文件,保留 data.json。

插件界面保持英文。采用 MIT 许可证,保留上游声明。

验证与限制

构建、Lint、106 项自动化测试和 36 个浏览器排版场景通过,并已通过真实 Obsidian 用户验收。画布菜单仍依赖内部 API;移动端及广泛的第三方主题、插件兼容性尚未验证。极小标题需要放大阅读,大型画布首次显示时可能短暂停顿。

中文指南 · 反馈问题

README file from

Github

Semantic Map Canvas

English | 简体中文

Semantic zoom for the official Obsidian Canvas. Assign importance levels to notes and groups, then zoom out to move from detailed content to compact titles and an overview.

The plugin interface is in English. This guide is available in English and Chinese.

Current release: 0.0.12. Desktop Obsidian 1.9.14+ is required. Mobile and broad theme/plugin compatibility have not been verified.

See it in action

Auto — zoom out, keep the meaning

Move from detailed notes to a clear overview by zooming out.

Automatic semantic zoom: detailed notes become compact titles and group overviews.

Manual — choose the view, keep the zoom

Switch between Detail, Structure, Overview, and Map without changing the zoom level.

Manual display mode selection at a fixed zoom level.

Install

  1. Open Releases and choose a release, including a pre-release if available.
  2. Download its three individual assets: main.js, manifest.json, and styles.css. The automatically generated source archives are not installable plugin packages.
  3. Create .obsidian/plugins/semantic-map-canvas/ inside your vault and place all three files there.
  4. Restart Obsidian and enable Semantic Map Canvas in Settings → Community plugins.

If no release assets are available yet, build from source using the development instructions below and copy the same three files into your vault. A GitHub release does not automatically add the plugin to Obsidian's community catalog.

Use

Right-click an ordinary node (text, file, or link) or a group and select Semantic level:

Level Meaning Default
L1 Domain Broadest topics
L2 Core Core ideas Groups
L3 Structure Supporting structure Ordinary nodes
L4 Detail Fine detail

Zoom in and out to change the display. Moving or nesting a node does not change its assigned level.

Mode Ordinary nodes Groups
DETAIL L1–L4: native content Native edge titles
STRUCTURE L1–L3: compact titles; L4: hidden L1/L2: edge titles; L3: central titles when possible; L4: hidden
OVERVIEW L1/L2: compact titles; L3/L4: hidden L1: edge titles; L2: central titles when possible; L3/L4: hidden
MAP L1: compact titles; L2–L4: hidden L1: central titles when possible; L2–L4: hidden

A group keeps its edge title while it contains a visible node or group of equal or higher priority, or an object being edited. Nested groups at the default L2 keep outer titles at the edge and summarize the innermost eligible group in the center. Hiding a group does not automatically hide its contents. An edge is hidden if either endpoint is hidden.

In Auto, the farthest display mode follows the highest level actually present: L1 → MAP, L2 → OVERVIEW, L3 → STRUCTURE, L4 → DETAIL. This prevents a blank display caused solely by a missing higher level. Actual zoom remains unrestricted; extreme zoom or panning away can still make content invisible.

Central titles wrap and shrink to fit. Ordinary nodes use an existing shortLabel override, otherwise the first nonempty text line, file basename, or URL hostname. Group titles use the group name. Titles are plain text. Long titles are not truncated and there is no fixed line limit. The maximum screen font size is about 24px; tiny regions require zooming in to read. There is currently no UI for editing shortLabel.

If you lose track of hidden nodes, choose Auto or L4 ? Detail; in Auto you can also zoom in. Or run Semantic Map Canvas: Toggle semantic visibility from the command palette. This pause lasts only for the current plugin session. Disabling the plugin, switching the active canvas, or opening a normal note restores native rendering on the previous canvas. Only the active canvas is processed.

Auto and manual display modes

Right-click the empty canvas background and open Display mode:

  • Auto (default): follows zoom, hysteresis and the highest-level display cap.
  • L1 — Map, L2 — Overview, L3 — Structure, L4 — Detail: fix the display to that mode while you freely zoom and pan.

Manual choices do not change node Semantic levels and bypass the highest-level cap. Selecting L1 — Map without any L1 nodes can hide all nodes; right-click the background and choose Auto or L4 — Detail to recover. Zooming in alone does not leave a manual mode. Central titles continue to resize.

The choice is saved per Canvas in plugin data.json, survives reopening and renaming, and defaults to Auto for old data. A failed save keeps the previous selection. Pausing semantic visibility restores native content without resetting the choice. Switching back to Auto uses the current zoom.

The menu also appears in native canvas settings. The plugin extends an internal menu builder on the active Canvas instance and restores it on switch/unload. In native read-only mode, use the canvas settings menu if the background menu is unavailable.

Data and privacy

The plugin operates locally without network requests or telemetry. Semantic levels and optional shortLabel values are saved in the plugin's data.json, keyed by canvas path and node ID. Rendering changes do not rewrite node positions, dimensions, or content in your Canvas files.

Renaming a canvas moves its metadata; deleting a canvas removes its record. Metadata for an individually deleted node is retained to support undo. A failed save preserves the previous in-memory state and displays a notice.

Legacy schema v1 metadata is backed up and verified before migration to schema v2: old L1 → L2, L2 → L3, L3 → L4. shortLabel values are preserved. This migration is not repeated. Historical recovery instructions are in the Phase 7 report (Chinese).

Limits and compatibility

  • Uses internal Canvas APIs and DOM structures, which may change between Obsidian versions.
  • Native selection can still include visually hidden nodes. Pause semantic visibility before bulk editing if necessary.
  • Containment requires a fully enclosed rectangle. Partial overlaps do not count; groups with identical bounds are peers. Arbitrary overlapping titles are not rearranged.
  • Large canvases, especially thousands of nodes, can pause briefly during initial rendering or geometry changes.
  • Text fitting caches measurements; zoom updates reuse the layout. Font, title, and size changes trigger recalculation.
  • Node size presets and a shortLabel editor are not implemented.

Initial mode boundaries are 10%, 25%, and 60%. Hysteresis uses 9%/11%, 23%/27%, and 58%/62% to reduce flicker near boundaries. Zoom is sampled every 100ms; geometry, editing, and DOM changes are reconciled approximately every 300ms.

Report problems through Issues, in Chinese or English. Include the plugin and Obsidian versions, reproduction steps, and a screenshot or minimal example with private content removed.

Development

Use Node.js 18+ and npm.

npm ci
npm run build
npm run lint
npm test

npm run dev watches source changes. npm run benchmark runs the simulated-DOM performance benchmark; npm run test:visual runs isolated Chrome/Edge layout checks. These do not replace testing in Obsidian.

npm run deploy:test builds and copies the three plugin assets into VaultsforTest/.obsidian/plugins/semantic-map-canvas/ within this project, preserving existing data.json. The test vault and generated artifacts are not tracked in Git. Phase-specific test canvases mentioned in historical reports are local development fixtures, not included in a source clone.

  • src/canvas/: active canvas, native menus, viewport sampling, compatibility adapter.
  • src/semantic/: semantic levels, display rules, containment, metadata and migration.
  • src/rendering/: visibility classes, adaptive labels and cleanup.
  • tests/: rules, storage, DOM and lifecycle regression tests.

Historical development and validation reports are currently in Chinese: Phase 12, Phase 11, Phase 10 performance, and Canvas runtime.

Based on the Obsidian sample plugin. Licensed under MIT.

Bilingual release notes for 0.0.12

Upstream template attribution and its original license: third-party notices.

Phase 13 acceptance guide (Chinese)