Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-PALETTE-269

Caret on an alert or admonition type lists the types

When the caret is on the type of a GitHub alert head or of a MyST admonition directive, the extension SHALL show above it a list of the types of that syntax with their icons, and a chosen type replaces the type text only.

Part of StRS-MDOKFSTUDIO-PALETTE-020, outside the paths drawn on its map.

Part of StRS-MDOKFSTUDIO-PALETTE-021, outside the paths drawn on its map.

Scenarios 2

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

nominalChoosing a type
Giventhe caret on the type word of `> [!NOTE]` in GFM, MyST or Full mode, or on the type of `:::{note}` in MyST or Full mode
Whenthe caret arrives there (a click, an arrow key, typing)
Thena list opens with an icon per type, none lit: the five GFM types NOTE, TIP, IMPORTANT, WARNING and CAUTION for an alert, the admonition types of the Admonition list (without Custom) for a directive
choosing a type replaces the type text only, as one more edit; the title, the body and the caret stay in place
the arrow keys move the lit type, Enter chooses it and Escape closes the list
boundaryWhere the list does not open
InputOutcome
The caret elsewhere on the head line or in the bodyNo list; a list opened for the type closes when the caret leaves it
A selection instead of a caretNo list
An admonition directive in GFM mode, or an alert in strict modeNo list: the list follows the palette mode
The same type after Escape or a choiceThe list stays closed until the caret has left the type
The caret measurable, with room above the lineThe list sits above the caret line; otherwise it sits under it

Implemented in 4

Tested by 3