Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-TABLE-064

The table bar rides down with a tall table and stays visible

When a cell editor is open and the table bar would lie under the sticky band or the preview controls, the extension SHALL keep the bar visible, by translating it down with a tall table to 4 px below the usable top and never past the end of the table, and by scrolling the page up by exactly the missing distance when the bar appears above the reading offset. The bar SHALL paint above the row and column handles, so that no handle takes a press meant for a button of the bar.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-TABLE-008, in the state “The cell editor is open”.

Scenarios 9

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

nominalScrolled into a tall table
Givena table taller than the pane scrolled so that its top is under the sticky band
Whenthe page scrolls
Thenthe bar is translated down to the usable top plus 4 px, the table text does not move, and the bar carries the stuck mark
boundaryNear the end of the table
Giventhe table's bottom close to the usable top
Whenthe page scrolls
Thenthe translation is limited so that the bar bottom does not pass the table bottom
boundarySize of the bar against the viewport
InputOutcome
A bar taller than 40 percent of the viewport and a table scrolled under the bandThe bar stays in its place above the table: the shift stays 0 px and the stuck mark is not set
A bar at most 40 percent of the viewport and the same scrollThe bar rides down
nominalWindow resize while the editor is open
InputOutcome
A bar translated down and the window resized (the resize event fires)The shift is recomputed for the new geometry
The editor closed, then the window scrolls or is resizedThe scroll and resize listeners of the bar are gone and nothing is recomputed
nominalBar appearing above the reading offset
InputOutcome
The bar appears 30 px above the usable top with the page scrolled downThe page scrolls up by 30 px as a preview-owned scroll and the edit anchor is moved by the same delta
The page is scrolled to 10 px and the bar is 30 px above the usable topThe scroll is limited to 10 px
boundaryNo scroll into view
InputOutcome
A bar at or below the usable topNo scroll is made
Only the empty part of the bar lies under the preview controlsNo scroll is made
A bar above the usable top and a selected cell whose bottom plus the delta passes the viewport heightNo scroll is made
boundaryBar opening under the preview controls at the top of the page
InputOutcome
The bar opens with its top under the preview controls, its box reaching under them, and the page scrolled less than the missing distance (a table right under the first heading, page at its top)The bar gives up the width from 4 px left of the controls to the right edge of its column (`--sphinx-preview-table-menu-inset`): its buttons wrap left of the controls and every one stays clickable
The same bar with the page scrolled enough to bring it below the controlsNo inset: the scroll into view above reveals it
A bar that opens below the controlsNo inset
A narrow pane where the inset would leave the bar under 200 pxNo inset: the bar keeps the whole width
A bar that gets the insetThe inset is decided before the reveal, from the page as it is when the bar appears; the buttons then lie left of the controls and the page is not scrolled for them

The inset is measured when the bar is filled, never on a scroll, so a scroll never reflows the page.

nominalA later layout change hides the bar again
InputOutcome
The bar is shown and its status wraps onto a new line, which moves the bar above the usable top, then the edit anchor is restoredThe bar is revealed again by the missing distance
The bar size is unchanged and the writer has scrolled, then the edit anchor is restoredThe writer's scroll is not undone
boundaryA handle on a button of the bar
InputOutcome
A row or column handle whose box lies on a button of the barThe press on the button reaches the button: the bar is positioned in the flow (no offset) with a z-index above the handle layer, so the handle does not take it

Implemented in 4

Tested by 7