Markdown OKF-Schema Studio

Use case StRS-MDOKFSTUDIO-FMSCHEMA-001

Frontmatter appears as a readable, configurable properties table

As a writer, I read my document metadata as a table above the text, safely, without opening the YAML; I read values in the form I typed them, hide the Description column when I need room, turn the table off or adjust how frontmatter is checked, and see validation results update while I type.

Use case diagram

How it is split

This use case (StRS) is reached by 2 paths, one per coloured line. A path goes from one situation (circle) to the next; each step (pill) is a behaviour (SwRS) with its own tests. Where paths meet, they share the circle or the step.

path 1: Read and fold the properties path 2: Edit the frontmatter, starts at 2 other outcomeone dot = one scenario checked: nominal boundary refusal
SwRS-MDOKFSTUDIO-FMSCHEMA-001: The frontmatter block is found by its fences and parsed as a YAML mappingSwRS-MDOKFSTUDIO-FMSCHEMA-0016 teststhe page shows thefrontmatter as aproperties table abovethe bodySwRS-MDOKFSTUDIO-FMSCHEMA-090: The frontmatter properties table collapses under its header and is shown again on every page loadSwRS-MDOKFSTUDIO-FMSCHEMA-0904 teststhe writer presses the toggle nextto the title and the table ishidden below the headerSwRS-MDOKFSTUDIO-FMSCHEMA-043: The table is refreshed in place after edits, after the field editor closesSwRS-MDOKFSTUDIO-FMSCHEMA-0432 teststhe page re-analyses thefrontmatter 300 ms after the lastchange and replaces the tableSwRS-MDOKFSTUDIO-FMSCHEMA-001: The frontmatter block is found by its fences and parsed as a YAML mappingSwRS-MDOKFSTUDIO-FMSCHEMA-0016 testsYAML that does not parseshows one error row "Invalidfrontmatter YAML" with theparser message, and the bodystill rendersSwRS-MDOKFSTUDIO-FMSCHEMA-001: The frontmatter block is found by its fences and parsed as a YAML mappingSwRS-MDOKFSTUDIO-FMSCHEMA-0016 testsan opening fence without aclosing fenceSwRS-MDOKFSTUDIO-FMSCHEMA-004: The propertiesTable setting hides the table while the body rendersSwRS-MDOKFSTUDIO-FMSCHEMA-0043 testswith the propertiesTablesetting off, neither thetable nor the raw text showsSwRS-MDOKFSTUDIO-FMSCHEMA-006: Property values read like YAML in a lean tableSwRS-MDOKFSTUDIO-FMSCHEMA-0063 testseach value is shown as YAML reads it, a boolean as aread-only checkboxSwRS-MDOKFSTUDIO-FMSCHEMA-005: Without a schema the table lists the keys in source order, escapedSwRS-MDOKFSTUDIO-FMSCHEMA-0056 testswithout a type, a two-column Names and Values table lists thekeys in source orderSwRS-MDOKFSTUDIO-FMSCHEMA-043: The table is refreshed in place after edits, after the field editor closesSwRS-MDOKFSTUDIO-FMSCHEMA-0432 testswhile a field editor is open the new table is held backA document starts with a `---` line and a YAML mappingA document starts with a--- line and a YAMLmappingThe properties table is shown (paths 1, 2)The properties table isshown2The table is hidden below its headerThe table is hiddenbelow its headerThe properties table shows the new frontmatterThe properties tableshows the newfrontmatter

This map has 93 different ways through it in 8 steps or fewer. Instead of testing each one end to end, the 6 behaviours on the map are tested one by one, with 29 scenarios.

Behaviours of this use case

SwRS-MDOKFSTUDIO-FMSCHEMA-001The frontmatter block is found by its fences and parsed as a YAML mapping 6 testsSwRS-MDOKFSTUDIO-FMSCHEMA-004The propertiesTable setting hides the table while the body renders 3 testsSwRS-MDOKFSTUDIO-FMSCHEMA-005Without a schema the table lists the keys in source order, escaped 6 testsSwRS-MDOKFSTUDIO-FMSCHEMA-006Property values read like YAML in a lean table 3 testsSwRS-MDOKFSTUDIO-FMSCHEMA-014The Description column collapses and the choice is kept per document not on the map6 testsSwRS-MDOKFSTUDIO-FMSCHEMA-043The table is refreshed in place after edits, after the field editor closes 2 testsSwRS-MDOKFSTUDIO-FMSCHEMA-090The frontmatter properties table collapses under its header and is shown again on every page load 4 tests
SwRS-MDOKFSTUDIO-FMSCHEMA-002A document without a closing fence has no frontmatter superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-001 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-003Frontmatter fences accept Windows line endings superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-001 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-007Boolean values show as read-only checkboxes superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-006 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-008Long lists are cut after fifty items superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-006 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-009Empty lists and null values show as YAML tokens superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-006 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-010The properties table has a lean frame superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-006 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-011The table fits a narrow preview superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-006 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-012Every table value is HTML-escaped superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-005 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-013The properties section maps to source line 1 superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-005 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-015The Description choice is remembered per document superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-014 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-016Narrow previews start with the Description column collapsed superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-014 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-017Invalid YAML gives one error row and an error badge superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-001 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-018Frontmatter that is not a mapping gives an error row superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-001 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-044A new table waits while a field editor is open superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-043 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-045A frontmatter setting change re-analyses the open previews superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-004 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-075The body still renders when the table is off superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-004 Markdown file
SwRS-MDOKFSTUDIO-FMSCHEMA-076Invalid YAML does not stop the body from rendering superseded superseded by SwRS-MDOKFSTUDIO-FMSCHEMA-001 Markdown file