Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-FMSCHEMA-090

The frontmatter properties table collapses under its header and is shown again on every page load

When a writer presses the toggle next to the Frontmatter properties title, the extension SHALL hide the table below the header, show it again on the next press, keep the state across content patches and edits of the open document, and show the table expanded whenever the page loads or a document is opened.

Step 2 of path 1 in StRS-MDOKFSTUDIO-FMSCHEMA-001: from “The properties table is shown” to “The table is hidden below its header”.

Scenarios 4

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

nominalCollapse and expand
Givena document with a frontmatter properties table shown
Whenthe writer presses the toggle next to the title Frontmatter properties
Thenthe table is hidden while the title and the toggle stay, the toggle reports aria-expanded false and is labelled Expand frontmatter properties, and a second press shows the table again with aria-expanded true
nominalThe state holds while the document stays open
Giventhe table collapsed
Whenthe properties section is replaced by a content patch or an edit
Thenthe table stays collapsed and the toggle keeps reporting aria-expanded false
boundaryPage load and newly opened document
InputOutcome
A page loads while the table was collapsed in the previous pageThe table is shown and aria-expanded is true; the state is never stored in the panel state or the workspace
A document is opened in a new previewThe table is shown
The issue badge is pressed while the table is collapsedThe table is shown first, then the focus goes to the first row with an issue
The line marker is requested on a property line while the table is collapsedThe table is expanded first and the row is marked (SwRS-MDOKFSTUDIO-LIFE-194)
The line marker is requested on any other front matter line (a fence, a comment)The table stays collapsed; a later placement of the marker never expands it
boundaryKeyboard and the Description column
InputOutcome
Enter or Space on the focused toggleThe toggle is a button, so it collapses or expands the table and opens no editor
The Description column collapsed or expandedIndependent of the table state; the table keeps its state

Implemented in 2

Tested by 4