Behaviour SwRS-MDOKFSTUDIO-LIFE-094
Blocks changed by another tool glow briefly
When the text of a previewed document changes by an undo, a redo or an edit that is neither the preview's own nor the writer typing, the extension SHALL make the blocks the change updated glow once for about 600 ms, with the text readable and nothing moved.
Step 2 of path 1 in StRS-MDOKFSTUDIO-CORE-001: from “The preview shows the unsaved text” to “The updated blocks glow briefly”.
Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-LIFE-005, in the state “A new render is done”.
Scenarios 8
The situations the tests check; open one to read it.
nominalAgent edit
Givena previewed document that is not the active editor's document
Whenanother tool changes it
Thenthe preview records the revision of the change as an outside change
boundaryWhich changes count as outside
| Input | Outcome |
|---|---|
| An undo or a redo (change reason 1 or 2) | Outside change, always |
| A change of a document that no text editor shows, while the preview is not applying its own edit | Outside change |
| A change of the document of the active text editor while no key was pressed in the last 500 ms | Outside change |
| A change of the document of the active text editor whose lines are more than one line away from every cursor and selection, whatever the keys | Outside change |
| An edit the preview asked for, being applied to that document | No outside change |
| The writer types in a text editor of the document: a key in the last 500 ms and the change on a cursor | No outside change, but an undo of that typing is |
nominalThe patch carries the changed line ranges
Givenan outside change at revision 5, a page at revision 4 and a patch to revision 6
Whenthe patch is posted
Thenit carries the line ranges of the changed lines
boundaryNo ranges
| Input | Outcome |
|---|---|
| An outside change that touches 51 ranges (more than 50) | The patch carries no ranges, so nothing glows |
| No outside change between the revisions the patch moves across | The patch carries no ranges |
| The page is loaded as a whole | No ranges are attached |
nominalGlow of the updated blocks
Givenan outside edit changing two blocks
Whenthe page updates
Thenboth blocks glow once for about 600 ms, the glow attribute is set then removed; a changed code block glows on its pre
refusalSkip the glow when it would mislead
| Input | Outcome |
|---|---|
| An update of 41 blocks (more than 40) | Nothing glows |
| A range list with more than 50 ranges, empty or invalid | Nothing glows |
| A changed block that is included | It does not glow |
| A changed block with an open editor, or the block being edited | It does not glow |
nominalThe glow is readable in three themes
Givena patch after an outside change in the light, dark and cream pages at 900 px
Whenthe glow is paused at its start
Thenexactly the updated paragraph and bullet carry a translucent wash and their text contrast is at least 4.5:1 (visual scenarios lifecycle-sync/v01-update-glow-light-900, v02-update-glow-dark-900 and v03-update-glow-cream-900)
boundaryThe glow moves nothing
Giventhe same patch, compared at the start and at the end of the glow
Whenthe glow plays
Thenno element changed its box and the page does not scroll sideways
Implemented in 6
Tested by 6
Known limits (1)
- VS Code reports a key press only for typing and cursor keys, not for Backspace, Delete or a paste, so one of these pressed first after 500 ms without a key glows the changed block once.
Replaces
SwRS-MDOKFSTUDIO-CORE-048Glow blocks changed outside the preview superseded superseded by SwRS-MDOKFSTUDIO-LIFE-094 Markdown file
SwRS-MDOKFSTUDIO-CORE-049Skip the glow when it would mislead superseded superseded by SwRS-MDOKFSTUDIO-LIFE-094 Markdown file