Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LAYOUT-032

A wide table scrolls inside its own box with shaded edges

When a table is wider than the pane outside Auto breakout, the extension SHALL let it scroll sideways inside its own box, limited to the column width, without widening the page, mark it as overflowing when it is more than 1 px wider than its box so that the theme shades its edges, and keep a cell holding a single word of at most 24 characters on one line. The extension SHALL also give every cell of a content table (not the frontmatter properties table) a minimum width of 5em, so that columns never wrap words letter by letter and a table that no longer fits uses this wide-table behaviour.

Step 1 of path 1 in StRS-MDOKFSTUDIO-LAYOUT-001: from “A document holds a table wider than the pane” to “The table scrolls in its own box and the page does not widen”.

Scenarios 6

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

nominalService-level table at 460 px
Givena service-level table in a 460 px pane in dark theme, Margin mode
Whenthe table is scrolled to its end
Thenthe far-right column is reachable and the page has no sideways scroll
nominalSixteen-column table at 900 px
Givena table with sixteen columns in a 900 px pane in dark theme
Whenthe table is scrolled to its end
Thenthe far-right column is reachable and the page has no sideways scroll
nominalTable with many columns
Givena seven-column table whose header words "document" and "parse" would otherwise be squeezed to one or two letters per line, in Margin mode
Whenit is shown
Thenevery cell has a computed minimum width of at least 5em, the words stay whole, and the table scrolls sideways when the columns no longer fit
refusalTable that fits
Givena table that fits
Whenit is shown
Thenno scroll bar appears
boundaryOverflow mark
InputOutcome
Table with a scroll width of 900 and a client width of 400 (not a properties table)The table carries data-sphinx-table-overflow=true
Scroll width 401 against client width 400Not an overflow
Scroll width 402 against client width 400Sets the mark
Scroll width 400 against client width 400, after a markRemoves the mark
A properties table with an overflowNever marked
A second pass over the same tableWrites no attribute
boundaryShort identifiers
InputOutcome
Overflowing table with the cells nw-02 and NorthBoth are marked data-sphinx-short-cell and set to nowrap
Cell North Pole (two words)Not marked
Cell holding a 25-character wordNot marked
A table that fitsThe nowrap rule applies only to a table marked as overflowing
A properties tableNo cell is marked

Implemented in 2

Tested by 4

Known limits (3)

Replaces

SwRS-MDOKFSTUDIO-CORE-035Scroll wide tables inside their box superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-032 Markdown file
SwRS-MDOKFSTUDIO-LAYOUT-033A scrolling table shades its overflowing edges superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-032 Markdown file
SwRS-MDOKFSTUDIO-LAYOUT-034Short identifiers stay on one line in a scrolling table superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-032 Markdown file