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
| Input | Outcome |
|---|---|
| A document with no remembered choice, in a preview 640 px wide at page start | The Description column starts collapsed |
| A document with no remembered choice, in a preview 641 px wide at page start | The Description column starts shown |
| A document with an explicit remembered choice, in a narrow preview | The 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 document | The saved panel value is used and the stored one is not applied |
| A new session for a document without a saved panel value | The stored choice of the document is read and applied |
boundaryAt most 200 documents
| Input | Outcome |
|---|---|
| Choices stored for 201 documents, the oldest document opened again | Its choice is forgotten and the default applies |
| A choice read or written again, then a 201st choice stored | The choice used last is kept |
boundaryOld one-key-per-document choices
| Input | Outcome |
|---|---|
| Three legacy keys of the form descriptionsCollapsed:{uri} and an empty map | The map holds the three documents and the legacy keys are deleted |
| A legacy key for a document that the map already holds | The map's value is kept |
refusalMalformed stored value
| Input | Outcome |
|---|---|
| A stored value that is a string | The map is empty |
| A stored list with a pair that holds a number instead of a boolean | The valid pairs are kept and that pair is dropped |
Implemented in 5
Tested by 6
Known limits (2)
- resizing the preview after page start does not change the choice.
- the stored choice is read only when a session is created and not after a switch inside one session; see SwRS-MDOKFSTUDIO-LIFE-125.
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