Skip to content

feat: embed boards in pages with a live preview - #80

Merged
AmrMsCLL merged 1 commit into
mainfrom
feat/board-embeds
Oct 9, 2026
Merged

AmrMsCLL merged 1 commit into
mainfrom
feat/board-embeds

Conversation

@AmrMsCLL

@AmrMsCLL AmrMsCLL commented Oct 9, 2026

Copy link
Copy Markdown
Member

Boards step B2.

  • Embed a board in a page: /board in the page editor creates a board inside the page and embeds it. The embed shows a preview of the drawing (Excalidraw's exportToSvg, loaded only when a preview is on screen, images included) and an Open board link. Embedded boards count as links, so the board lists the page under Linked from.
  • Preview data: GET /notes/:id/board returns a board's current elements from storage (boards only; pages get 404).
  • Board menu: Excalidraw's menu is replaced with Export image (PNG/SVG), Save to file, Find on canvas, the canvas colour and Help. Its GitHub/Discord links and Reset the canvas (which would wipe a shared board) are gone.
  • The Excalidraw asset path and image loading moved to components/board-files.ts, shared by the canvas and the preview.
  • The page format goes to 3, so older tabs reload instead of dropping embeds.

Checked in the browser (local stack): /board adds an embed; after drawing on the board the page shows the preview; an image dropped on the board uploads through /spaces/:id/files, is stored on the board by file id and appears in the preview; the board menu shows only the items above.

Tests: test/block-menu.spec.tsx (the Board entry), test/notes.spec.tsx, test/document-text.spec.ts (embeds become links); test/integration/notes.spec.ts covers the board endpoint (CI).

@github-actions github-actions Bot added the size/l 201-600 changed lines, excluding lockfiles label Oct 9, 2026
@AmrMsCLL
AmrMsCLL merged commit bdf15a6 into main Oct 9, 2026
7 checks passed
@AmrMsCLL
AmrMsCLL deleted the feat/board-embeds branch October 9, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l 201-600 changed lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant