Skip to content

Commit 0ccde78

Browse files
committed
docs: correct outdated y-attributed-format comment in basicText test
The TODO claimed y-attributed-format has no toDOM / visual marker. It does (SuggestionMarks.ts renders a <span data-type="modification"> that the editor CSS highlights), as the regenerated screenshot now shows.
1 parent 6694dce commit 0ccde78

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

tests/src/browser/y-prosemirror/basicText.test.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,13 @@ test("suggestion mode: 'hello world' -> 'hello universe'", async () => {
9595
`);
9696
});
9797

98-
// TODO: format-only suggestions have no visual marker in the rendered
99-
// editor – the screenshot for this test shows "hello **world**" with
100-
// no indication that the bold is a *pending* suggestion. Only
101-
// `y-attributed-insert` / `y-attributed-delete` have a `toDOM` in
102-
// SuggestionMarks.ts; `y-attributed-format` does not. Decide whether
103-
// this is intentional (formats considered "trivial") or a UX gap.
104-
//
10598
// Format-only addition: text content stays the same but a style mark
10699
// (bold) is added on top. Surfaces how suggestions track pure format
107-
// changes (currently `y-attributed-format`, with no visual marker).
100+
// changes via the `y-attributed-format` mark. All three suggestion
101+
// marks (`y-attributed-insert` / `-delete` / `-format`) have a `toDOM`
102+
// in SuggestionMarks.ts; the format mark renders a
103+
// `<span data-type="modification">` which the editor CSS highlights, so
104+
// the screenshot shows bold "world" with the blue suggestion marker.
108105
test("suggestion mode: add bold to 'world'", async () => {
109106
const { editor, screen, baseDoc, suggestionDoc, sync } =
110107
await setupSuggestionTest({ userAction: "bold 'world'" });

0 commit comments

Comments
 (0)