Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-FMSCHEMA-014

The Description column collapses and the choice is kept per document

When a writer presses the toggle in a column header of a schema table, the extension SHALL collapse or restore the Description column while keeping Name and Value readable, and store the choice for that document in the workspace state so that a refresh or a new preview of the document restores it.

Part of StRS-MDOKFSTUDIO-FMSCHEMA-001, outside the paths drawn on its map.

Part of StRS-MDOKFSTUDIO-LIFE-014, outside the paths drawn on its map.

Scenarios 7

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

nominalCollapse
Givena schema table with the Description column shown
Whenthe writer presses the toggle labelled Collapse Description column
Thenthe column is hidden, the toggle label becomes Expand Description column and alert rows span two columns
nominalRestore
Giventhe same table with the column collapsed
Whenthe writer presses the toggle labelled Expand Description column
Thenthe column is shown again and alert rows span three columns
nominalThe choice is stored for the workspace
Givena writer collapsed the Description column of a.md
Whenthe page reports its state, then the preview is refreshed or reopened for a.md
Thenthe workspace state holds a.md as collapsed and the column is still collapsed in a new preview of a.md
boundaryStart state of the column
InputOutcome
A document with no remembered choice, in a preview 640 px wide at page startThe Description column starts collapsed
A document with no remembered choice, in a preview 641 px wide at page startThe Description column starts shown
A document with an explicit remembered choice, in a narrow previewThe explicit choice is kept; the narrow default does not override it
A restored panel state with descriptionsCollapsed false, and a stored choice of true for the documentThe saved panel value is used and the stored one is not applied
A new session for a document without a saved panel valueThe stored choice of the document is read and applied
boundaryAt most 200 documents
InputOutcome
Choices stored for 201 documents, the oldest document opened againIts choice is forgotten and the default applies
A choice read or written again, then a 201st choice storedThe choice used last is kept
boundaryOld one-key-per-document choices
InputOutcome
Three legacy keys of the form descriptionsCollapsed:{uri} and an empty mapThe map holds the three documents and the legacy keys are deleted
A legacy key for a document that the map already holdsThe map's value is kept
refusalMalformed stored value
InputOutcome
A stored value that is a stringThe map is empty
A stored list with a pair that holds a number instead of a booleanThe valid pairs are kept and that pair is dropped

Implemented in 5

Tested by 6

Known limits (2)

Replaces

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