Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-CORE-022

Build-dependent constructs show an inert placeholder with a warning

When a document holds a construct that only a full project build can resolve (an unknown directive, `toc`, an unexpanded `{include}`, `{embed}`, `{glossary}`, a known directive that renders nothing, a `{cite}` role, a `{bibliography}` directive, a `#tbl:` notebook output reference or an unexecuted `{code-cell}` output), the extension SHALL render an inert, muted placeholder that shows the name, arguments and body as text and list a warning for a directive, a notebook output or a code cell output while the render stays successful.

Step 1 of path 2 in StRS-MDOKFSTUDIO-CORE-003: from “The preview shows a good render” to “A placeholder with a warning stands in its place”.

Step 1 of path 1 in StRS-MDOKFSTUDIO-MYST-005: from “A document holds a construct that only a full project build can resolve” to “A muted placeholder is drawn and the render stays successful”.

Scenarios 6

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

nominalUnknown directive
Givenan unknown directive `{foo} bar` with a body, or `{animation}` with a body, on line 4
Whenthe preview renders
Thena placeholder shows `{foo} bar` and the body text, mapped to its line
the status region lists one warning "Directive {foo} is not available outside a full build." with line 4 and the status is "Preview ready"
boundaryDirectives that only a build resolves
InputOutcome
`toc`the same placeholder and the same warning
`{embed}`the same placeholder and the same warning
`{glossary}`the same placeholder and the same warning
an unexpanded `{include}`the same placeholder and the same warning
a known directive that renders to nothingthe placeholder is shown, not an empty gap, with the warning
a supported directive (admonitions, figure, image, tables, grid, toctree, math, code family, mermaid, uml, include)no placeholder and no such warning
a document with no unresolved directiveno such warning is listed
boundaryCitations
InputOutcome
`{cite}`smith2020```[smith2020]` in muted text with the tooltip "Unresolved citation: smith2020"; an inert citation placeholder; no warning is listed
`{cite}`a,b,c`` in a paragraph, a list and an admonitionthe group stays in its paragraph with every key kept and no warning is listed
a document without a `{bibliography}`no bibliography is appended
nominalBibliography directive
Givena `{bibliography}` directive
Whenthe preview renders
Thenthe placeholder says "Bibliography resolves at build time."
a document without the directive shows no such note
nominalNotebook output and code cell output
Givenan unexecuted `{code-cell}` output
Whenthe preview renders
Thena note "Code cell output is not executed in the active-file preview; it is available in a full project build." is shown with a warning on its line
a `#tbl:` notebook output reference shows a note "Notebook output #tbl:... is only available in a full project build." with a warning on its line
nominalInert styling
PlaceholderStyle
unresolved directivemuted text in a dashed box
citationmuted text with a dotted underline and a help cursor
notebook outputmuted text
bibliographymuted text

Implemented in 2

Tested by 6

Replaces

SwRS-MDOKFSTUDIO-CORE-023List a warning for an unavailable directive superseded superseded by SwRS-MDOKFSTUDIO-CORE-022 Markdown file
SwRS-MDOKFSTUDIO-CORE-036Style placeholders as inert superseded superseded by SwRS-MDOKFSTUDIO-CORE-022 Markdown file
SwRS-MDOKFSTUDIO-CORE-047Show a citation as an unresolved placeholder superseded superseded by SwRS-MDOKFSTUDIO-CORE-022 Markdown file
SwRS-MDOKFSTUDIO-MYST-020Unresolved citations show as muted keys superseded superseded by SwRS-MDOKFSTUDIO-CORE-022 Markdown file
SwRS-MDOKFSTUDIO-MYST-021Directives needing a build show an inert placeholder with a warning superseded superseded by SwRS-MDOKFSTUDIO-CORE-022 Markdown file
SwRS-MDOKFSTUDIO-MYST-022The bibliography directive explains build-time resolution superseded superseded by SwRS-MDOKFSTUDIO-CORE-022 Markdown file
SwRS-MDOKFSTUDIO-MYST-023Notebook output references show a note and a warning superseded superseded by SwRS-MDOKFSTUDIO-CORE-022 Markdown file