super-productivity/packages/plugin-dev/document-mode
Johannes Millan aa7b2d1e9d feat(document-mode): keyboard handling for task chips, reachable gutter
Two issues:

1. Enter/Backspace inside a task chip had no special handling. Enter
   would split a taskRef into two with the same taskId (broken).
   Backspace at start could merge the chip's content into the previous
   block, detaching the title from its task entity.

2. The block hover gutter sat outside #editor-root. Moving the mouse
   from a block toward the gutter crossed an unwatched gap, firing
   mouseleave on the root and hiding the gutter before the mouse
   reached it.

Fixes:

- TaskRefNode.addKeyboardShortcuts:
  - Enter at end of chip → addTask + insert new chip below; cursor
    lands inside it. Async; chain runs after refreshTaskCache.
  - Enter on an empty chip → convert to paragraph + deleteTask.
  - Enter in middle → swallow (no-op for POC).
  - Backspace at start of empty chip → deleteTask + remove chip.
  - Backspace at start of non-empty chip → swallow (no merge).
- #editor-root padding-left bumped to 60px so the gutter (positioned
  52px left of each block) renders inside the root — the mouse stays
  inside the root the whole time.
- .block-gutter adds padding-right so its hit area extends rightward
  toward the block, and uses [style*='flex'] as the visibility cue
  rather than the previous brittle hover chain.
2026-05-21 17:47:54 +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): keyboard handling for task chips, reachable gutter 2026-05-21 17:47:54 +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