Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-REVIEW-215

Changed or added front matter fields get their own change bar

When the page receives line ranges that meet the lines of a front matter field, the extension SHALL mark the properties table row of that field with data-sphinx-preview-changed and draw one change bar for that row, like the bar of a changed body block, and when a field present at HEAD is missing from the shown text and no row is marked, it SHALL mark the whole properties table.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-REVIEW-017, in the state “The page holds the changed line ranges”.

Scenarios 3

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

nominalA changed or added field
InputOutcome
A front matter field whose lines differ from HEAD (a changed value)its row of the properties table is marked and gets one bar with the top and the height of the row
A front matter field that is not in HEAD (an added field)its row is marked and gets one bar, in the same green as a changed body block
A field whose value spans several lines (a list or a mapping)one bar for the whole row, not one per line
A field whose lines are unchangedits row is not marked
Both a front matter field and a body block changedone bar per marked row and one per marked block
boundaryA removed field
InputOutcome
A field present at HEAD and missing from the shown textthe host adds a range on line 1; when no row is marked, the properties table as a whole is marked and gets one bar
A removed field together with a changed or added fieldthe rows of the changed or added fields are marked and the table, which contains them, is not
A body that lost lines but no front matter fieldno range is added and the table is not marked
boundaryRows that are not marked
InputOutcome
The properties table is switched off, or the document has no front matterno row exists and nothing is marked
A row under an open editorthe row is not marked, as for any block

Implemented in 4

Tested by 4