Behaviour SwRS-MDOKFSTUDIO-REVIEW-021
A highlight, badge or orphan entry opens the thread popover
When a reader clicks, or presses Enter or Space on, a thread highlight, a thread badge or an orphaned comments entry while comments are shown, the extension SHALL toggle the popover of that thread, which lists every comment as plain text and stays inside the pane.
Step 3 of path 1 in StRS-MDOKFSTUDIO-REVIEW-001: from “The quoted text is highlighted” to “The thread popover lists the comments”.
Part of StRS-MDOKFSTUDIO-REVIEW-003, outside the paths drawn on its map.
Scenarios 7
The situations the tests check; open one to read it.
nominalClick toggles the popover of one thread
| Given | When | Then |
|---|---|---|
| a highlighted quote | the reader clicks it | the popover opens, and the click edits no block and follows no link |
| the popover is open | the reader clicks the same highlight again | the popover closes, or asks Discard or Keep editing when the reply box holds text |
| a popover open for one thread | the reader clicks the highlight of another thread | the popover of the second thread replaces the first |
| comments hidden (button off or setting false) | the reader clicks a former highlight | no popover opens and the click acts as on plain text (SwRS-MDOKFSTUDIO-REVIEW-152) |
nominalEnter or Space on a focused target
| Input | Outcome |
|---|---|
| Enter on a focused highlight, badge or orphaned comments entry | the popover opens (or closes) and the key does nothing else |
| Space on a focused highlight, badge or orphaned comments entry | the popover opens (or closes) and the key does nothing else |
| any other key on a focused highlight | the popover state does not change |
nominalThe popover lists every comment as text
Givena thread with a first comment and a reply
a comment body made of an HTML tag
a comment body made of an HTML tag
Whenthe popover opens
the popover opens
the popover opens
Thenboth entries appear in order, each with author, date in the local format and body
the tag is shown as text
the tag is shown as text
nominalThe popover of a resolved thread shows a Resolved note
| Given | When | Then |
|---|---|---|
| a resolved thread | the popover opens | a Resolved note appears and the popover carries the resolved attribute |
| an open thread | the popover opens | no Resolved note appears |
boundaryThe popover stays inside the pane horizontally
| Input | Outcome |
|---|---|
| popover opened | its width is at most 360 px and its left edge is at least 8 px from the left edge of the pane |
| highlight close to the right edge of a pane at least 216 px wide | the left edge is moved so that the popover ends at least 8 px before the right edge |
| pane narrower than 376 px | the width is the pane width minus 16 px, never below 200 px |
refusalClosing the popover
| Input | Outcome |
|---|---|
| Escape while a popover is open | the popover closes and the event is stopped from reaching other handlers |
| Escape with no popover open | the key reaches the other handlers |
| Escape on a popover that asks "Delete thread?", then the thread is opened again | the popover shows Resolve and Delete, not the question |
| click outside a popover that asks "Delete thread?" | the popover closes |
| Escape, or a press outside, on a popover whose reply box holds text | the popover stays and asks Discard or Keep editing (SwRS-MDOKFSTUDIO-REVIEW-218) |
boundaryThe threads are posted again while a popover is open
| Open state | Thread still posted | Thread no longer posted |
|---|---|---|
| popover | the popover for the same thread is open on the new highlight, badge or entry | the popover is closed |
| reply box with the text "draft" | the reopened reply box shows "draft" | the popover and the draft are gone (thread deleted by another tool) |
| popover asking "Delete thread?" | the popover still asks the question with Yes and No | not applicable |
| a question for one thread, then another thread opened | no question is shown for the other thread | not applicable |