Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-REVIEW-049

A new comment is anchored by its lines, quote and surroundings

When a reader saves a comment on a selection, the page SHALL anchor it from the first line of the first selected block to the last line of the last selected block, with the selected text collapsed and cut at 500 characters and up to 32 characters of text before and after it.

Step 4 of path 1 in StRS-MDOKFSTUDIO-REVIEW-003: from “The comment is sent” to “The comment has its anchor”.

Scenarios 4

The situations the tests check; open one to read it.

nominalSelection across blocks
Givena selection from a paragraph on lines 3 to 4 to a paragraph on lines 7 to 8
Whenthe comment is saved
Thenthe anchor runs from line 3 to line 8
nominalNormal selection
Givena selection of "second paragraph" in the middle of a block
Whenthe comment is saved
Thenthe quote is "second paragraph" and the prefix and suffix hold the words around it
boundaryTriple click
Givena triple click whose selection ends at offset 0 of the next block
Whenthe comment is saved
Thenthe anchor stays in the block that was clicked
boundaryLong selection
InputOutcome
A selection of more than 500 characters with long surroundingsThe quote has 500 characters
The text before the selection is longer than 32 charactersThe prefix has at most 32 characters
The text after the selection is longer than 32 charactersThe suffix has at most 32 characters

Implemented in 1

Tested by 1