Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-FMSCHEMA-006

Property values read like YAML in a lean table

When the properties table is displayed, the extension SHALL show each frontmatter value in the Value cell as YAML reads it, a mapping without a link as a YAML code block, a boolean as a read-only checkbox, a list as at most 50 dash-marked items and an empty list or null as `[]` or `null`, inside a table drawn without outer border that fits a preview 640 px wide or less.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-FMSCHEMA-001, in the state “The properties table is shown”.

Scenarios 5

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

nominalValue kinds
InputOutcome
A mapping value `obj` with the keys `a: 1` and `b` holding a list with xThe Value cell of obj holds a code block in YAML syntax reading `a: 1`, `b:` and ` - x` on separate lines
A list field that holds a mapping itemThe list item is shown with its keys as a nested key and value list, not as raw JSON
`flag: true`The Value cell holds a checked checkbox with aria-disabled true and tabindex -1, and the word true
`flag: false`The Value cell holds an unchecked checkbox with aria-disabled true and the word false
`empty: []`The Value cell reads []
`none:` with no valueThe Value cell reads null
boundaryList limit
InputOutcome
A list field with 52 items50 items are listed, one dash-marked item per line, and the text "+ 2 more" follows them
A list field with exactly 50 itemsAll 50 items are listed and no "more" text appears
nominalLean frame
Givena document with frontmatter in a dark, a white and a cream theme
Whenthe preview is rendered
the header row is inspected
Thenthe section and table have no border and no background, the cells are transparent and the title Frontmatter properties has no background
the header cells show the translucent grey background and the data cells do not, and an error row has the red background
boundaryContrast thresholds
InputOutcome
The title badge in a dark, a white and a cream themeIt reaches 2.5:1 contrast
The description textIt reaches 2.2:1 and is smaller than the value text
The value textIt reaches 4:1
boundaryNarrow preview
InputOutcome
A preview 460 px wide showing a schema table with alert rows and link detailsThe page has no horizontal overflow and long names, values and links wrap inside their cells, with fixed columns
A preview wider than 640 pxThe table keeps its normal automatic layout

Implemented in 1

Tested by 3

Known limits (2)

Replaces

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