Skip to content

feat: add callouts, toggles, tables and a block handle to pages - #78

Merged
AmrMsCLL merged 3 commits into
mainfrom
feat/notes-blocks
Oct 8, 2026
Merged

AmrMsCLL merged 3 commits into
mainfrom
feat/notes-blocks

Conversation

@AmrMsCLL

@AmrMsCLL AmrMsCLL commented Oct 8, 2026

Copy link
Copy Markdown
Member

Steps N2 and N3 from .claude/.Plans/as2026-10-07-strata-boards-and-notion-notes.md, with the approved Tiptap extensions.

New blocks

  • Callouts (our own callout node, a tinted box with a 💡), toggles (@tiptap/extension-details, open state kept), tables (@tiptap/extension-table, 3 × 3 with a header row; Tab moves between cells and adds a row at the end) and highlighted text (@tiptap/extension-highlight, a toolbar button and ==text==).
  • All of them are in the / menu.

Block handle (@tiptap/extension-drag-handle-react)

  • A ⠿ handle beside the hovered block: drag it to move the block, or click it for Duplicate, Delete and "Turn into …" (text, headings, lists, checklist, quote, code, callout, toggle). On a table it offers Add a row and Add a column.
  • "Turn into" clears the block to paragraphs first, so a callout or list can become any other type.
  • The handle stays put while its menu is open, so moving the mouse to the menu doesn't retarget another block.

Older tabs

  • A tab running an older build would drop callouts, toggles and tables it doesn't know, and its edit could remove them from the shared page. The browser now connects with ?format=2, and the server refuses older formats with outdated. A refused tab says "Strata was updated. Reload the page to keep editing" and turns its editor or board read-only.
  • Tabs from before this change send no format, so after this deploys they can't connect until reloaded; their unsent edits stay on the device and sync after the reload.

Packages: the four approved extensions plus their required peers @tiptap/extension-drag-handle, @tiptap/extension-node-range and @tiptap/extension-text-style, all MIT at 3.31.4. @tiptap/extension-unique-id comes later with block comments.

Checked in the browser (local stack): inserting a callout, toggle and table from the menu, turning a callout into a quote, duplicating a block and dragging it below the table.

Tests: test/block-menu.spec.tsx (now also callouts, toggles and tables), test/notes.spec.tsx, test/journal.spec.tsx, lint and both builds. The realtime integration tests now connect with the current format, and one checks an older format is refused.

@github-actions github-actions Bot added the size/l 201-600 changed lines, excluding lockfiles label Oct 8, 2026
@AmrMsCLL
AmrMsCLL merged commit 93fbb10 into main Oct 8, 2026
7 checks passed
@AmrMsCLL
AmrMsCLL deleted the feat/notes-blocks branch October 8, 2026 20:06
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