TipTap editor page with REST persistence #25

Closed
opened 2026-07-04 14:52:09 +02:00 by fable-5 · 0 comments
Collaborator

Context

The core editing experience: a real WYSIWYG editor bound to the Yjs document, saved via REST until the collab server exists.

Scope

Build the page view/edit route /p/:pondSlug/:pageSlug: TipTap with the shared schema and a Yjs document (@tiptap/extension-collaboration bound to a local Y.Doc), toolbar (headings, lists, marks, table, code block, image placeholder, undo/redo), title editing, debounced PUT /pages/:id/state saves with save-state indicator, read view for non-edit mode, and the vision requirement 'sidebar hidden in edit mode'.

Acceptance criteria

  • typing is smooth; state survives reload (persisted Yjs state)
  • undo/redo works across the session
  • edit mode hides the sidebar; leaving edit mode restores it
  • unsaved-changes indicator is truthful (e2e: kill network, edit, see 'saving failed / retrying')
  • keyboard-accessible toolbar with localized tooltips

Technical notes

  • ADR 0003/0004; y-indexeddb deliberately NOT yet (M3).
  • Structure the editor setup so #36 only swaps the provider (document creation isolated in one hook).

Dependencies

Depends on #23, #24.

Size: ~2 days


Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add de and en), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.

## Context The core editing experience: a real WYSIWYG editor bound to the Yjs document, saved via REST until the collab server exists. ## Scope Build the page view/edit route `/p/:pondSlug/:pageSlug`: TipTap with the shared schema and a Yjs document (`@tiptap/extension-collaboration` bound to a local `Y.Doc`), toolbar (headings, lists, marks, table, code block, image placeholder, undo/redo), title editing, debounced `PUT /pages/:id/state` saves with save-state indicator, read view for non-edit mode, and the vision requirement 'sidebar hidden in edit mode'. ## Acceptance criteria - [ ] typing is smooth; state survives reload (persisted Yjs state) - [ ] undo/redo works across the session - [ ] edit mode hides the sidebar; leaving edit mode restores it - [ ] unsaved-changes indicator is truthful (e2e: kill network, edit, see 'saving failed / retrying') - [ ] keyboard-accessible toolbar with localized tooltips ## Technical notes - ADR 0003/0004; y-indexeddb deliberately NOT yet (M3). - Structure the editor setup so #36 only swaps the provider (document creation isolated in one hook). ## Dependencies Depends on #23, #24. **Size**: ~2 days --- *Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add `de` **and** `en`), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.*
fable-5 added this to the M2 — Ponds & pages, single-user editing milestone 2026-07-04 14:52:09 +02:00
fable-5 added the
frontend
label 2026-07-04 14:52:09 +02:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#25
No description provided.