Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-TOOLBAR-025

The sticky band is fixed, aligned with the column and clear of the toolbar

When the band is shown, hidden or changes its number of lines, the extension SHALL keep it fixed to the top of the pane at full width with no gap above it, outside the document flow and ignoring pointer events, with its text aligned to the content column, ending before the toolbar and narrowed by the table of contents reserve, keeping each heading level on one line, cut with an ellipsis when it is too long, and draw it flat and bold, ended by a one pixel rule, with a soft shadow below it, in the colour set of the active theme, only while text scrolls under it, and none at the top of the page.

Step 2 of path 1 in StRS-MDOKFSTUDIO-TOOLBAR-004: from “The band shows the current heading path” to “The current section stays pinned at the top”.

Part of StRS-MDOKFSTUDIO-TOOLBAR-006, outside the paths drawn on its map.

Scenarios 11

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

nominalBand grows
Givena band that goes from one to three lines
Whenthe band is measured
Thenits top is 0, its position is fixed and the text below does not shift
nominalPointer
Giventhe pointer over the band
Whenthe reader clicks
Thenthe click reaches the content below, because the band ignores pointer events
boundaryText aligned with the column
PaneOutcome
900 px in Margin widththe left edges of the band text box and of the content column are equal within 1 px
460 pxtheir left edges are equal within 1 px
boundaryText stops before the toolbar
InputOutcome
toolbar's left edge is left of the column's right edgethe text right edge is the toolbar left edge minus 8 px
wide pane where the toolbar is right of the columnthe text right edge is the column's right edge
boundaryRoom published for the toolbar
InputOutcome
toolbar grows from collapsed to expanded, then the band position is refreshed--sphinx-preview-toolbar-width on the band is the new toolbar width plus 22 px
no toolbar, or a toolbar whose width is not finitethe variable is 0 px
boundaryTable of contents reserve
InputOutcome
900 px pane with the table of contents openthe band is narrowed by 256 px and its right edge is at most the left edge of the column
460 px pane with the button pressedthe band width is not reduced, because the column is hidden
boundaryLong heading cut with an ellipsis
Givena 460 px pane and long headings at depth 3
depth 1, a long H1 and a zoom of 160 %
Whenthe band is measured
the band is measured
Thenit shows three rendered lines, each ended by an ellipsis where the heading does not fit, its height equals three lines and the document flow does not shift
the band is one line and the first line of the section is below the band
nominalFlat, bold style with a rule
Givena shown band
Whenits style is read
the borders of the band and of the first heading of the page are compared
Thenthe font weight is at least 600 and larger than the body text, the radius is 0, the shadow is none (the page is at the top) and the bottom border is 1 px
the band border and the h1 border have the same colour
nominalText scrolls under the band
Givena preview scrolled so that the sticky band is shown over text, in the light, dark, cream or white theme or the host's current theme
Whenthe page is more than 1 px below the top
Thenthe band carries the data-scrolled-under marker and a box-shadow offset downward and blurred, in a shadow colour set per theme (darker in dark), which shifts no content and leaves the band fixed at the top
the toolbar, stacked above the band, is not covered by the shadow
boundaryPage at the top
Givena preview whose scroll position is 0 or 1 px
Whenthe sticky band is updated
Thenthe band has no data-scrolled-under marker and no shadow, so nothing is drawn under a band over no scrolled text
boundaryBack to the top
Givena scrolled preview with the shadow shown
Whenthe page is scrolled back to the top
Thenthe marker is removed again

Implemented in 3

Tested by 5

Replaces

SwRS-MDOKFSTUDIO-TOOLBAR-002A soft shadow under the sticky heading band shows only while text scrolls under it superseded superseded by SwRS-MDOKFSTUDIO-TOOLBAR-025 Markdown file