super-productivity/packages/plugin-dev/document-mode
Johannes Millan e428e20700 feat(document-mode): subtask support, squircle done-toggle
Adds first-class subtask rendering and editing in the document-mode
plugin, plus a couple of polish fixes:

- New `subTaskRef` node — same shape as taskRef (content: inline*,
  taskId + isDone attrs, identical NodeView wiring) but rendered with
  a `.sub-task-ref` class so CSS indents it under the parent and
  draws a short connector line. Subtask Enter at end creates another
  subtask under the same parent (resolved via findParentTaskIdBefore);
  Enter on an empty subtask deletes the task and outdents.

- Seeding (buildSeedDoc) now emits each parent followed by its
  subTaskRefs from task.subTaskIds, so opening a context shows the
  full task tree. migrateStoredDoc handles both taskRef and
  subTaskRef. collectKnownTaskIds, reconcileTitlesFromDoc,
  refreshTaskRef and isTaskRefFocused all walk both node types.

- appendMissingTask now routes subtasks to insertSubtaskByParent
  (which places the new subTaskRef after the parent's existing
  subtask group), so an externally-added subtask appears under
  its parent instead of at the doc tail.

- Enter at the end of a parent taskRef now uses
  positionAfterParentGroup so the new sibling lands past any
  subtasks — previously it would interleave with the parent's
  children.

- Done-toggle is now a squircle (`<rect rx="5">` instead of
  `<circle>`) to match the shape used in the actual app's task list.
2026-05-21 18:39:29 +02:00
..
scripts feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00
src feat(document-mode): subtask support, squircle done-toggle 2026-05-21 18:39:29 +02:00
.gitignore feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00
package-lock.json feat(document-mode): Notion-style UX (gutter, bubble menu, block menu) 2026-05-21 17:34:13 +02:00
package.json feat(document-mode): Notion-style UX (gutter, bubble menu, block menu) 2026-05-21 17:34:13 +02:00
tsconfig.json feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00