Behaviour SwRS-MDOKFSTUDIO-TABLE-085
The table bar's cell group formats the cell text
When a cell editor is open, the extension SHALL add to the table bar, after a separator, a group named "Cell formatting" holding only the palette buttons allowed in a cell and no mode selector, and apply its buttons, their shortcuts and the cell slash menu to the cell text.
Step 1 of path 1 in StRS-MDOKFSTUDIO-TABLE-015: from “A cell editor is open” to “The cell text is formatted”.
Scenarios 7
The situations the tests check; open one to read it.
nominalCell group
| Input | Outcome |
|---|---|
| A cell editor open in GFM mode, the bar inspected | After the separator the group holds bold, italic, strikethrough, link, colour, colour code, emoji and key buttons and no block-only button such as heading, quote, table, image or code fence |
| The same editor in MyST mode, the bar inspected | Sub, sup and the key role are offered |
nominalA button applies to the cell text
Givenall of the cell text selected and Bold pressed
Whenthe cell text is read
Thenit starts with ** and the editor is still open and focused, and Cmd+Z restores the text; the format was applied as one native edit
WHEN the writer then presses Enter, the cell is saved
WHEN the writer then presses Enter, the cell is saved
nominalCmd or Ctrl with B, I or K
| Input | Outcome |
|---|---|
| Text selected in a cell and Cmd+B (Ctrl on other platforms) | The text is bold, the default is prevented and the key is stopped |
| Text selected in a cell and Cmd+K | The link panel opens in the cell |
| Cmd+I in the cell text box | Italic runs on the cell text and the key stays away from the browser |
refusalBlock-only shortcut
| Input | Outcome |
|---|---|
| Text in a cell and the shortcut of the TODO action pressed | The cell text is unchanged |
| Cmd+B in the same cell | The action runs |
nominalSlash menu of a cell
| Input | Outcome |
|---|---|
| The writer types a slash in a cell editor in MyST mode | The menu lists Bold, Italic, Strikethrough, Colour, Link, Emoji, Key, Subscript, Superscript and Key (MyST), and no list entry, Table, Code block, Quote, Rule, Alert, Admonition, Figure or Image; the chosen command runs through the cell formatting group |
| A cell whose caret is inside a colour code | Colour code is listed too |
boundaryRebuilt bar keeps the group
| Input | Outcome |
|---|---|
| The editor moved to another cell by a click, rendered again | The bar element is the same and holds the same group element |
| The editor moved to the next cell by Tab, rendered again | The same bar and the same group are in place |
boundaryThe group leaves with the editor
| Input | Outcome |
|---|---|
| The editor closed by Escape | No cell group and no table bar are left |
| The editor moved to another cell | The group is still there |