Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LIFE-178

The page marks a requested line with an arrow and a band at the line's place

When the host asks the page to reveal a source line, the page SHALL scroll silently so that the line sits at the reading line below the sticky heading band, unfold a folded heading section or a closed details block that holds it, and draw an arrow in the left margin and a light band at the exact line of a paragraph or of a code block itself, at the top of the enclosing block for any other block (a pipe table row, a tab item and the front matter have their own requirements), and at the nearest block for a line outside every block. When the request asks for the if-off-screen scroll, the page SHALL scroll only when the line is not already on screen below the sticky heading band, and SHALL always draw the marker.

Part of StRS-MDOKFSTUDIO-LIFE-023, outside the paths drawn on its map.

Scenarios 2

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

nominalReveal a code line
Givena page with a numbered code block whose line 20 is `value_15 = 15`, in a 900 px pane
Whenthe page receives previewRevealLine for line 20
Thenone arrow and band are drawn on exactly that code line, the line sits at the reading line and is inside the viewport, its block has aria-current=location, and no previewScroll is posted
boundaryFolded, outside and soft-wrapped lines
InputOutcome
a line inside a closed details block or a folded heading sectionthe block unfolds first, then the marker is drawn
a line of a paragraphthe marker sits on that soft-wrapped line
a line of a list or a quote, or of a list-table, captioned table or raw HTML tablethe marker sits at the top of the enclosing block
a line outside every blockthe marker takes the nearest block
a page with no mapped blocknothing is drawn
a request with the if-off-screen scroll, the line on screenthe marker is drawn and the page does not move (the sticky band is respected)
a request with the if-off-screen scroll, the line off screenthe page scrolls the line to the reading line, as the default scroll does

Implemented in 8

Tested by 8