Behaviour SwRS-MDOKFSTUDIO-LAYOUT-007
The first element starts 40 px below the top
When a document opens in read mode or in edit mode, the extension SHALL start its first element, whatever the element is, 40 px below the top of the pane as a top margin of that element, including the frame of an open first-block editor with its edition palette on top and the Start writing button of an empty document.
Step 1 of path 1 in StRS-MDOKFSTUDIO-LAYOUT-004: from “A document opens in read mode or in edit mode” to “The first element is 40 px below the top”.
Scenarios 5
The situations the tests check; open one to read it.
nominalParagraph first in read mode
Givena document whose first element is a paragraph, read mode, 900 px pane
Whenthe preview is rendered
Thenthe paragraph starts 40 px (within 4 px) below the top of the pane
nominalElements with their own margin in read mode
Givendocuments that open with an h1, an h2, an h3, a table, an image, an admonition, a properties table or a schema properties table
Wheneach preview is rendered
Theneach first element starts 40 px (within 4 px) below the top, and the column itself has no 40 px padding and does not move
nominalEdit mode
Givenedit mode on and a document whose first element is a paragraph, then one that opens with an h1, h2 or h3, then one whose first element is an image, an admonition, a table or a properties table
Whenthe preview is rendered
Thenthe first element starts 40 px (within 4 px) below the top in each case
nominalOpen first-block editor
Givenedit mode on, a wide pane (900 px) and the first paragraph opened in its editor
Whenthe frame is rendered
Thenthe frame, with the palette on top, starts 40 px (within 4 px) below the top and the palette starts at the height of the editor frame
boundaryOther first blocks and the Start writing button
| Input | Outcome |
|---|---|
| The first block is an h1, h2, h3, an image or an admonition and is opened in its editor | The frame starts 40 px (within 4 px) below the top |
| An empty document, edit mode on, Margin width mode, light and dark themes | The Start writing button starts 40 px (within 4 px) below the top |
| The same empty document in Auto and in Full width | The button still starts 40 px (within 4 px) below the top |
Implemented in 1
Tested by 2
Known limits (3)
- CHANGELOG entry 0.2.1 still quotes superseded margins (56 px for the first-block editor, 24 px for Start writing, a 24 px margin for the button); the uniform 40 px of the Unreleased entry replaces them.
- Only visual scenarios check the edit-mode half; no unit test differs between the modes.
- Palette sticking and mode belong to the palette requirements; only the position of the frame is specified here.
Replaces
SwRS-MDOKFSTUDIO-LAYOUT-008The first element starts 40 px below the top in edit mode superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-007 Markdown file
SwRS-MDOKFSTUDIO-LAYOUT-009The open first-block editor keeps the 40 px gap superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-007 Markdown file
SwRS-MDOKFSTUDIO-LAYOUT-010The Start writing button starts 40 px below the top superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-007 Markdown file