Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-PALETTE-031

Palette popovers open in the frame, one at a time, and Escape or typing closes them

When the writer opens, leaves or dismisses a popover of the palette, the extension SHALL open it inside the editor frame under its button (under the caret for the alert list), keep at most one open, and close it on Escape or on typing or pressing in the text box, giving the focus back to the text box and keeping the editor open.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-PALETTE-005, in the state “The palette is in view above the text box”.

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

Part of StRS-MDOKFSTUDIO-TABLE-016, outside the paths drawn on its map.

Scenarios 5

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

nominalEvery popover opens inside the frame
Givenan editor at 900 px with the heading list, the table grid, the emoji picker, the alert list and the colour picker opened one after the other
Wheneach popover is inspected
Theneach lies inside the editor frame, under its button (under the caret for the alert list), pulled left so that it stays inside the width of the bar or the frame
PanePopovers openedOutcome
900 pxheading list, table grid, emoji picker, alert list, colour pickereach lies inside the editor frame
360 pxgrid, emoji and heading popoverseach stays inside the pane
460 px (emoji picker of the cell formatting group)emoji pickerits left edge is not left of the viewport and its right edge is not beyond it
900 px (emoji picker of the cell formatting group)emoji pickerthe picker is inside the viewport
nominalOne popover at a time and a toggling button
Giventhe heading list open
Whenthe writer presses the Emoji button
the writer presses the Emoji button again
Thenthe heading list is gone and the emoji picker is open
the picker closes and no new popover opens

A button whose action has a popover has aria-haspopup menu and an aria-expanded that is true exactly while its popover is open; at most one element with the class sphinx-preview-edit-palette-menu exists, and the button of a closed popover has aria-expanded false.

nominalEscape or typing closes only the popover
Givena popover open
Whenthe writer presses Escape, or types in the text box, or presses the mouse in it
Thenthe popover closes, the text box keeps or regains the focus and the editor stays open (no save and no cancel is posted)
PopoverEscapeTyping or mouse press in the text box
Heading listthe list closes and the editor stays openthe popover closes; the editor stays usable
Emoji picker (filter or an emoji)the picker closes, the text box has the focus and the editor is still opena mouse press closes the picker and the editor stays usable
Size gridthe grid closes and the editor stays opentyping a character closes the grid and the editor stays open
Colour picker (colour code field)the picker closes, the focus returns to the text box and the editor stays openthe popover closes
Link panel (also Cancel)the panel closes, the text box has the focus with its selection restored, no change is made and the editor stays openthe panel closes without restoring the old selection: a later press of a stale Insert cannot corrupt the text, and a mouse press keeps the selection chosen by the press
Figure form (also Cancel)the form closes, the text box has the focus and the editor stays open (Cancel writes nothing)typing closes the form; a mouse press closes the form
Emoji picker of the cell formatting groupthe picker closes and the cell editor stays opennot stated
boundaryEscape with no popover, second Escape, insertion from the popover
InputOutcome
Escape with no popover openthe editor is cancelled as usual (a cell is cancelled, see SwRS-MDOKFSTUDIO-TABLE-025)
Escape a second time after the popover closed (colour picker, emoji picker)the editor is cancelled
first Escape with a popover openthe popover closes and no cancel is posted
emoji clicked with Shift held, emoji picker openthe emoji is inserted and the picker stays open (an insertion made by the popover itself does not close it)
emoji chosen without Shiftthe emoji is inserted and the focus returns to the text box
nominalA popover closed while it holds the focus gives the focus back
Giventhe emoji filter has the focus
Whenthe popover is closed
Thenthe text box has the focus and no save is run (the closing is not read as leaving the editor)
ClosingOutcome
popover closed while the emoji filter has the focusthe text box is the active element and the leave callback is not called
an emoji chosen while the filter has the focusthe emoji is inserted and the focus returns to the text box

Implemented in 5

Tested by 6