Behaviour SwRS-MDOKFSTUDIO-LIFE-044
Changes to files and settings the render depends on render again
When a file that the shown render depends on is changed, created, deleted or renamed below the preview's root, or a markdownOkfSchemaStudio preview, plantuml or frontmatter setting changes, the extension SHALL render the shown document again or bring the page up to date, ignoring file events below build and tool folders of that root.
Step 1 of path 2 in StRS-MDOKFSTUDIO-LIFE-005: from “A preview shows a document” to “A new render is done”.
Scenarios 5
The situations the tests check; open one to read it.
nominalChanged include
Givena preview whose render includes preview-refresh.md
Whenpreview-refresh.md changes on disk
Thenthe preview renders again and shows the updated include text
boundaryWhich file events render again
| Input | Outcome |
|---|---|
| a file below the root that the render does not use changes | no render starts |
| the reader renames parts/intro.md to parts/start.md, and the render includes parts/intro.md | the preview renders again and shows the include as unresolved or as the new file |
| a rename of a file that is not a dependency | no render starts |
refusalFolders the preview ignores
| Input | Outcome |
|---|---|
| a path whose part below the preview's root has one of the segments .git, .venv, .vscode-test, _build, dist, htmlcov, node_modules, out, output, public or tmp, from a file event or from a change of a document other than the shown one | ignored for the preview, no render starts |
| an include under project/node_modules/x.md that the render depends on changes | no render starts |
| a workspace at /home/me/tmp/book, an included file changes on disk | the preview renders again: only the segments below the root are checked |
| a file at /home/me/tmp/book/out/x.md changes | ignored: the out segment is below the root |
nominalPreview setting
Givenan open preview and a change of markdownOkfSchemaStudio.preview.incrementalUpdates
Whenthe settings event arrives
Thenthe session's configuration holds the new value and the next update uses it
refusalOther setting section
Givena change of a setting outside the three sections, such as markdownOkfSchemaStudio.comments.authorName
Whenthe settings event arrives
Thenthe event is ignored by the preview lifecycle
Implemented in 1
Tested by 5
Known limits (1)
- the canonical form of the shown file is cached per raw path for the session, so a symlink retargeted under the shown file is not noticed until the path string changes.