Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-PALETTE-238

The slash menu lists the palette commands of the mode and scope

When the slash menu opens, the extension SHALL list the actions of the palette for the current mode and scope in the order of the buttons, without the buttons that depend on the caret and are hidden, together with the variants and the two list entries, grouped under category headings with an icon and a shortcut while the query is empty, and a disabled No command row when the query matches nothing.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-PALETTE-015, in the state “The slash menu lists the commands of the mode”.

Scenarios 6

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

nominalThe mode lists
Giventhe strict, GFM and MyST modes
Whenthe menu opens in each
Thenit lists the same actions as the palette buttons of that mode and nothing of a higher mode, plus Bulleted list and Numbered list
CaseOutcome
strict, GFM or MyST modethe actions of the palette buttons of that mode, in the order of the buttons, with Bulleted list and Numbered list
caret inside a colour codethe Colour code command is listed as well
caret outside a colour codethe Colour code command is not listed
caret inside a pipe tableList table is listed, Pipe table is not (see SwRS-MDOKFSTUDIO-TABLE-122)
caret inside a list tablePipe table is listed, List table is not (see SwRS-MDOKFSTUDIO-TABLE-122)
nominalAn empty query groups the commands, a query ranks them
Giventhe MyST mode and the menu just opened
Whenthe list is inspected, then the query tab is typed
Thenthe empty query shows headings Text, Blocks, Insert, Annotations, GFM and MyST in registry order, each row with an icon, the label and the shortcut where there is one, and the query shows one list, the best match first, each row with its category name
QueryOutcome
emptycommands under the headings Text, Blocks, Insert, Annotations, GFM and MyST in registry order, each with its icon and its shortcut when it has one
not emptyone list, the best match first, each command with its category name
nominalVariants run an action with a ready-made argument
Giventhe strict mode, then the MyST mode
When/h2 is typed and chosen, then /warning is typed
Thenthe line gets the prefix ## as with the Heading popover and the parent entry Heading is not listed, and the Warning alert and the Warning admonition are listed, the MyST one first
VariantsOutcome
Heading 1 to Heading 5 and Paragraphrun Heading with the argument that choosing the same option in the Heading popover gives
one Alert per typerun Alert with the argument of the same option in the Alert popover
one admonition per typerun Admonition with the argument of the same option in the Admonition popover, plus the version admonitions (see the scenario of the admonition entries below)
the pickers Alert, Admonition and Code blockstay listed
nominalMyST admonitions are listed with their icons
Giventhe MyST mode and an empty text box
When/ is typed
Thenthe list holds an entry "<kind> admonition" for note, tip, hint, important, warning, caution, attention, danger, error, seealso, versionadded, versionchanged and deprecated, and "Custom admonition", each with the icon of its preview callout badge
KindIcon (as the preview callout badge)
noteinformation circle
tip, hint, versionaddedlight bulb
importantstar
warning, attention, versionchangedtriangle
cautionoctagon
danger, error, deprecatedcircle with a cross
seealsocircle with an arrow
Custom admonitionthe Admonition icon
Giventhe MyST mode and an empty text box
the GFM mode, or the Admonition type popover of the MyST mode
When/versionadded is typed and Enter is pressed
the slash menu or the popover is opened
Thenthe text box holds the block `:::{versionadded} 1.0`, an empty line and `:::`, with 1.0 selected, in one undo step; versionchanged and deprecated write the same block with their name
the GFM menu lists no admonition entry, and the popover keeps offering only the ten simple types and Custom (the version admonitions are not options of the popover, see SwRS-MDOKFSTUDIO-PALETTE-127)
boundaryThe Key commands in MyST mode
Giventhe MyST mode, then the GFM mode
When/kbd is typed
Thenin MyST mode Key (MyST) is first and Key is also listed; in GFM mode Key is first and Key (MyST) is not listed
Palette modeOutcome
mystKey and Key (MyST) are both listed; Key (MyST) ranks first for the queries kbd and key
gfmKey is listed, Key (MyST) is not
refusalA query that matches nothing
Givenan open menu
Whenthe query zzzz is typed, then Backspace removes the query and the slash
Thena disabled row No command is shown, the live region reads No command and Enter inserts a line break, then the menu closes
StateOutcome
query matches no commanda disabled row No command, announced; Enter and Tab are left to the editor
Backspace removes the query and the slashthe menu closes

Implemented in 3

Tested by 4

Replaces

SwRS-MDOKFSTUDIO-PALETTE-268The MyST slash menu lists every admonition directive with its icon superseded superseded by SwRS-MDOKFSTUDIO-PALETTE-238 Markdown file