Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LAYOUT-043

Body text keeps clear of the floating toolbar

When the floating toolbar overlaps the text column at the top of a document whose first block is running text (not an interactive first element nor a box), the extension SHALL make the text of the first blocks wrap outside the toolbar rectangle and SHALL start every other top-level block within the toolbar's reach below that rectangle, and SHALL reserve nothing when the toolbar sits beside the column.

Step 2 of path 1 in StRS-MDOKFSTUDIO-LAYOUT-004: from “The first element is 40 px below the top” to “The first blocks are clear of the floating toolbar”.

Scenarios 6

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

nominalExpanded toolbar over a narrow column
Givena 393 px pane whose column content box runs from 31 to 362 px, the expanded floating toolbar from 277 to 379 px and from 12 to 178 px, and a heading followed by a paragraph and a note as the first blocks
Whenthe page is laid out
Then--sphinx-preview-toolbar-float-width is 93 px (362 minus 277 plus 8) and --sphinx-preview-toolbar-float-height is 186 px (178 plus 8, from the content top), an invisible right float of that size sits at the top of the column, and no text line of the heading or of the first paragraph intersects the toolbar
below the float the text takes the full column width again, and the heading keeps its 40 px gap
nominalA box near the top starts below the toolbar
Givena 900 px pane in Auto width mode where the expanded toolbar overlaps the column, a heading, a one-line paragraph and a small table
Whenthe page is laid out
Thenthe paragraph starts beside the toolbar, and the table starts at or below the toolbar's bottom edge, centred on the column
an open block editor of a paragraph within the toolbar's reach (not the first block) starts below the toolbar, so its edition palette, which sticks under the toolbar's bottom edge, never covers the frame
nominalMeasured in document coordinates and for any toolbar state
InputOutcome
A column whose content box ends at 377 px, a toolbar from 277 px and from 12 to 178 pxWidth 108 px and height 186 px
The same column scrolled by 300 pxWidth 108 px and height 186 px: the float stays at the top of the document, so text scrolled under the fixed toolbar is not moved
A collapsed toolbar from 337 to 379 px and from 12 to 54 px over the same columnWidth 48 px and height 62 px
boundaryToolbar beside the column
Givena column from 100 to 700 px and a toolbar that starts at 800 px
Whenthe page is laid out
Thenboth properties are 0 px and nothing is reserved
boundaryNo float
SituationOutcome
An open first-block editorFloat width and height 0 px; the first-block editor keeps its inset or clearance
The Start writing button, visible or hidden by the editor that replaced itFloat width and height 0 px; the button keeps its clearance
A leading properties tableFloat width and height 0 px; the table keeps its inset or clearance
A first block that is a box (a table, a note, a figure)Float width and height 0 px; the box keeps its 40 px gap
A toolbar nearer the column's left edge than its right edgeFloat width and height 0 px: the float is on the physical right, like the toolbar
A document with an image, figure or table aligned left or right anywhereNo float and no box moves: the document keeps its previous layout
nominalHeadings clear aligned tables and images
Givena table with `align="right"` and later one with `align="left"`, each followed by a short paragraph and a heading
Whenthe page is laid out
Theneach paragraph wraps beside its table and each heading starts below the table before it

Implemented in 2

Tested by 3

Known limits (6)