Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-TABLE-048

A labelled table bar above the table tells the position and holds the buttons

When a cell editor opens in a table, the extension SHALL create once a toolbar named "Table row and column actions" in the page flow directly above the table, showing seven labelled operation buttons and a status with the position of the selected cell, keep it while the editor moves between cells of that table, and remove it when the editor closes.

Step 2 of path 1 in StRS-MDOKFSTUDIO-TABLE-008: from “The cell editor is open” to “The table bar is shown above the table”.

Scenarios 7

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

nominalBar above the table
Givena cell editor opened in a table
Whenthe page is inspected
Thena toolbar named "Table row and column actions" is the previous sibling of the table in the page flow, with no floating coordinates, and its bottom is not below the top of the table
boundaryPlacement and lifetime
InputOutcome
A table that is the only child of a div wrapper that has no source-line attribute, a cell editor opensThe bar is placed before the wrapper
A table without a parentThe bar falls back to the body (read from the code, untested)
The editor moves to the next cell with TabThe same bar element is still in place and only its status changes
The editor is closed by Escape or by a saveNo table bar is left
nominalSeven labelled operation buttons
Givena cell editor open
Whenthe bar is inspected
Thenit holds seven buttons marked as table operations, in that order, each with an svg icon, a title and a label, and the buttons that follow the separator belong to the cell formatting group and are not table operations
Visible labelAccessible name, title and tooltip name
Row aboveInsert row before selected row
Row belowInsert row after selected row
Row −Delete selected row
Col leftInsert column before selected column
Col rightInsert column after selected column
Col −Delete selected column
List tableConvert to list-table
boundaryGroups and rules
InputOutcome
The group attributes of the seven buttons are readThe buttons carry the groups row, row, row, column, column, column and table
The styles are readThe rule style applies to the first button of the column group and of the table group: a thin rule before Col left and before List table
The styles are read for Row above, Row below, Row −, Col right and Col −No rule is drawn before them
The cell formatting group wraps onto a second line of the barIts rule is the first element of the group, so it starts the second line instead of ending the first
nominalStatus of the selected cell
InputOutcome
Two-column table with two body rows, editor in the header's first cellThe status reads "Header · column 1 of 2"
The editor in the second cell of the first body rowThe status reads "Row 1 of 2 · column 2 of 2"
A column added with Col right, the status readIt counts the new column count and the new selected column
The editor moves to another cellThe status is updated at every cell switch
The status has no textIt is not displayed and takes no room on the bar line
The status has text (the position of the cell)It is displayed
boundaryStatus centring
InputOutcome
Cell editor open in a sixteen-column table at 900 px; the vertical centres of the status and of the first operation button are comparedThey differ by at most 2 px
A status that wraps onto its own line in a narrow paneThe centring is not required
boundaryNarrow pane
InputOutcome
Cell editor open in a 460 px paneThe bar and its cell formatting group wrap onto several lines: no button of the cell group lies outside the bar and the bar is not wider than the viewport
Cell editor open in a 360 px paneThe bar and its group wrap inside the pane without overlap, which follows from the wrapping style and is not covered by any scenario

Implemented in 2

Tested by 6