feat: a comment or change says which line it belongs to

Three pairings, the way both word processors draw them: a bar in the margin
beside every line a change or an open comment covers (ChangeBarLayer), the
reviewing pane's card marked and scrolled into view, and a dashed leader from
the text to that card (ConnectorLayer). The leader is drawn for the one at the
caret only, and dropped where a second pane sits between text and card.

commentIdAt/revisionIdAt compare ranges, not the marks at the caret: both marks
are non-inclusive, so the range a click on a card selects would match nothing.
This commit is contained in:
Steffen Becker committed 2026-09-04 19:30:02 +02:00
1 parent 8c080b1d16
commit eb7f3c731d
11 files changed
+379 -7

No files matched your search

+6
View File
@@ -1022,6 +1022,12 @@
border-bottom: 1px solid rgba(200, 140, 0, 0.7);
}
/* The one the caret sits in (comment.ts): a heavier tint, so the pane's highlighted
card and the annotated text name each other. */
.tiptap .pm-comment-active {
background: rgba(255, 200, 60, 0.5);
}
.tiptap .pm-comment[data-comment-resolved='true'] {
background: none;
border-bottom-color: rgba(140, 140, 140, 0.6);