Behaviour SwRS-MDOKFSTUDIO-BLOCK-193
Page updates wait while an inline editor is open
While the page has an inline editor open, the extension SHALL hold back the renders, theme changes, PlantUML work, link refreshes, include changes and properties table updates that would replace the page content, and deliver only the newest render of those that waited once the editor closes.
Another outcome at step 1 of path 1 in StRS-MDOKFSTUDIO-BLOCK-006, in the state “A block editor is open”.
Part of StRS-MDOKFSTUDIO-FMEDIT-008, outside the paths drawn on its map.
Scenarios 10
The situations the tests check; open one to read it.
nominalRender during editing
Givenan open editor and a document change
Whena render finishes
Thenit waits and the editor keeps its text and caret
nominalThe newest waiting render is delivered when the editor closes
Giventwo renders that finished while the editor was open
Whenthe editor closes
Thenonly the newest reaches the page
boundaryWork queued twice and a host lock without page editor
| Input | Outcome |
|---|---|
| Work queued twice under the same key | The earlier one is discarded when the second is queued, and its stage is freed |
| The host holds an edit but the page reports no open editor, and a finished render arrives | The render reaches the page; only an explicit page report of an open editor holds finished renders |
nominalProperties update waits for the field editor
Givena field editor open
WhenpreviewPropertiesTable arrives
the editor closes and the deferral ends
the editor closes and the deferral ends
Thenthe table is not replaced and the markup is kept
the kept table is applied
the kept table is applied
nominalA content patch closes an open block editor without cancelling
Givenan open block editor whose text was autosaved
Whena content patch is applied
Thenthe editor is closed, no previewEditCancel is posted and the document keeps the autosaved text
refusalA content patch closes an open field editor
Givena field editor with typed text and a waiting properties update
Whena previewContentPatch arrives
Thenthe editor closes without a save and the waiting update is dropped
boundaryA content patch without an open editor
| Input | Outcome |
|---|---|
| A patch is applied and no block editor is open | Nothing else is closed |
| A patch arrives and no field editor is open | The patch is applied normally |
boundaryAn outside change over an open table cell editor's table
| Input | Outcome |
|---|---|
| A render of an outside change (undo, redo, revert, another writer) that overlaps the source lines of the table whose cell editor is open | The render is not held: it reaches the page at once and the content patch closes the cell editor (SwRS-MDOKFSTUDIO-TABLE-119) |
| An outside change elsewhere, text typed in the source, or the preview's own save | The render waits as before |
| An open editor that is not a table cell editor | The render waits as before |
nominalA document switch drops the work of the old document
Givenan editor closed by the flush and a render queued for the old document
Whenthe preview switches to another document
Thenthe open page editor is forgotten, the queued work is discarded and the new document renders at once
boundaryA switch while the host still applies an edit
Givena final save still being applied
Whenthe switch happens
Thenthe host's own edit lock is kept
Implemented in 4
Tested by 6
Known limits (1)
- a content patch closes an open field editor and loses its typed text.
Replaces
SwRS-MDOKFSTUDIO-FMEDIT-060A properties update waits until the field editor closes superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-193 Markdown file
SwRS-MDOKFSTUDIO-FMEDIT-061A content patch closes the field editor superseded superseded by SwRS-MDOKFSTUDIO-BLOCK-193 Markdown file