Behaviour SwRS-MDOKFSTUDIO-BLOCK-102
An empty body offers one Start writing button
While edit mode is on and the body of a rendered document has no block, the page SHALL show one Start writing button, after the properties table when there is one, in place of the insert points, and open the first-block editor from it on a click.
Step 1 of path 2 in StRS-MDOKFSTUDIO-BLOCK-011: from “Edit mode is on and the body of the document is empty” to “The editor of the first block is open”.
Part of StRS-MDOKFSTUDIO-BLOCK-003, outside the paths drawn on its map.
Scenarios 5
The situations the tests check; open one to read it.
nominalEmpty body shows one Start writing button
| Input | Outcome |
|---|---|
| An empty document in edit mode | One visible Start writing button exists for line 0 and no insert point |
| A document with only frontmatter | The Start writing button follows the properties table |
Givena rendered document whose body has no block, in edit mode
Whenthe page builds its bars
Thenthe button text is Start writing and its bar has the class sphinx-preview-insert-point--start
refusalNo Start writing button on a failed or pending render
Givenan error page with no body blocks in edit mode, or a pending render
Whenthe page builds its bars
Thenno Start writing button exists; a successful (or recovered) render of an empty document has the button
nominalA click opens the editor of the first block
Givenan empty document in edit mode
Whenthe writer clicks Start writing
ThenpreviewEditOpen carries insertAfterLine 0 and line 1, and the button is replaced by the focused editor
nominalThe button is hidden while its editor is open
Givenan empty document
Whenthe Start writing editor opens
the writer presses Ctrl or Cmd+Enter
the writer presses Escape instead
the writer presses Ctrl or Cmd+Enter
the writer presses Escape instead
Thenthe button is hidden behind the frame (the bar carries data-sphinx-preview-editing)
the block is saved
the editor closes and the button is visible again
the block is saved
the editor closes and the button is visible again
boundaryThe first-block editor is marked
| Input | Outcome |
|---|---|
| The editor of the first block of a document without frontmatter, edit mode on | The frame carries sphinx-preview-block-editor--first, whose margin is specified by SwRS-MDOKFSTUDIO-LAYOUT-007 and SwRS-MDOKFSTUDIO-LAYOUT-011 |
| The Start writing editor of a document without a properties table | The frame carries sphinx-preview-block-editor--first |
| A later block | No first-block mark |
| An insertion editor below another block | No first-block mark |
| The first body block below a properties table | No first-block mark |
| Start writing below a properties table | No first-block mark |