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
| Input | Outcome |
|---|---|
| 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 unchanged | its row is not marked |
| Both a front matter field and a body block changed | one bar per marked row and one per marked block |
boundaryA removed field
| Input | Outcome |
|---|---|
| A field present at HEAD and missing from the shown text | the 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 field | the 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 field | no range is added and the table is not marked |
boundaryRows that are not marked
| Input | Outcome |
|---|---|
| The properties table is switched off, or the document has no front matter | no row exists and nothing is marked |
| A row under an open editor | the row is not marked, as for any block |