Skip to content

feat: embed block type (reference another note inline) #190

Description

@oobagi

Problem

There's no way to reference another note. Users who organize related information across multiple notes have no way to cross-link them.

Goal

Add a note link block type that references another note and opens it in a modal overlay when clicked.

Markdown format

![[notebook/note-title]]

Behavior

  • Edit mode: Renders as editable raw syntax. Insertable via / command palette with notebook/note picker.
  • View mode: Renders as a styled link/pill showing the note title. Clicking opens the referenced note in an iOS-style modal overlay (slides up, dimmed background, dismissable).
  • Missing references: Show a "Note not found" badge instead of the link pill.

Tasks

  • Add Embed to BlockType enum
  • Parse ![[path]] syntax in parse.go
  • Serialize back to embed syntax
  • Round-trip tests
  • Add to / command palette with notebook/note picker
  • Resolve references at render time — check if referenced note exists
  • View mode: render as styled link pill
  • View mode: open referenced note in modal overlay on click
  • Modal overlay: iOS-style slide-up sheet with dimmed background, read-only note content, dismiss via Esc or click outside
  • Handle missing references gracefully (styled "Note not found" pill)
  • Add EmbedStyle to theme system (pill color, modal style)

Design considerations

  • This is a link, not inline content — no need for circular detection or depth limits
  • Modal shows the full note read-only; user can dismiss and return to the current note
  • Keep it simple: no navigation stack within the modal (v1)

Scope

Type: enhancement
Size: medium

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions