Skip to content

Commit 5deacdc

Browse files
committed
docs(openspec): archive the doc-viewer-access change
Moves the implemented change to the archive after a green CI run and updates keyword-documentation-rendering, library-documentation-markdown and vscode-documentation-viewer, which now describe the links into the Documentation Viewer, the links of types to their data types and Open as Markdown.
1 parent a83880f commit 5deacdc

10 files changed

Lines changed: 272 additions & 27 deletions

File tree

openspec/changes/doc-viewer-access/.openspec.yaml renamed to openspec/changes/archive/2026-10-03-doc-viewer-access/.openspec.yaml

File renamed without changes.

openspec/changes/doc-viewer-access/design.md renamed to openspec/changes/archive/2026-10-03-doc-viewer-access/design.md

File renamed without changes.

openspec/changes/doc-viewer-access/proposal.md renamed to openspec/changes/archive/2026-10-03-doc-viewer-access/proposal.md

File renamed without changes.

openspec/changes/doc-viewer-access/specs/keyword-documentation-rendering/spec.md renamed to openspec/changes/archive/2026-10-03-doc-viewer-access/specs/keyword-documentation-rendering/spec.md

File renamed without changes.

openspec/changes/doc-viewer-access/specs/library-documentation-markdown/spec.md renamed to openspec/changes/archive/2026-10-03-doc-viewer-access/specs/library-documentation-markdown/spec.md

File renamed without changes.

openspec/changes/doc-viewer-access/specs/vscode-documentation-viewer/spec.md renamed to openspec/changes/archive/2026-10-03-doc-viewer-access/specs/vscode-documentation-viewer/spec.md

File renamed without changes.

openspec/changes/doc-viewer-access/tasks.md renamed to openspec/changes/archive/2026-10-03-doc-viewer-access/tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
- `docs/02_get_started/index.md`: the Python-Markdown row names "Open Documentation (deprecated)" and "Show Documentation (deprecated)".
6565

6666
Verify with `npm run docs:build`.
67-
- [ ] 7.2 Run `hatch run lint:all`, `hatch run test:test`, `npm run lint` and `npm run compile`, and confirm that all pass. The CI run on Linux, Windows and macOS must be green for the new tests: no hard-coded paths or separators.
67+
- [x] 7.2 Run `hatch run lint:all`, `hatch run test:test`, `npm run lint` and `npm run compile`, and confirm that all pass. The CI run on Linux, Windows and macOS must be green for the new tests: no hard-coded paths or separators. (CI run 37147588908 on 04d9ca9a, 139 jobs, green.)
6868
- [x] 7.3 Check at run time in the isolated VS Code harness, on VS Code 1.127 and the installed version:
6969
- the source action menu on `Library Collections` lists "Show in Documentation Viewer", "Show in New Documentation Viewer" and "Open Documentation (deprecated)", in this order; "Open Documentation (deprecated)" still opens the Libdoc page;
7070
- with the bindings of the documentation in `keybindings.json`: Ctrl+Shift+. shows the menu; the binding with the arguments of the preferred action, on a keyword call, an import name and a keyword definition name, shows the viewer at the right place without a menu, the editor keeps the focus, and the menu shows that key next to "Show in Documentation Viewer"; in a comment VS Code reports that no preferred source action is available; Shift+F1 without a binding opens nothing;

‎openspec/specs/keyword-documentation-rendering/spec.md‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ When a keyword has documented arguments, the rendered keyword documentation SHAL
1313
- A name that the documentation describes without being an argument of the keyword SHALL get a row of its own, with its name and its description and the other cells empty.
1414
- A description SHALL be written into its cell as one line: a line break within a paragraph SHALL become a space, and each further paragraph and each list item SHALL start a new line within the cell (`<br>`). A `|` in a description SHALL be escaped, so that every row has the same number of cells.
1515

16-
A keyword without argument descriptions SHALL keep the argument table without the description column. When a return description exists it SHALL be shown with the return type (`**Return Type**: \`T\` — description`, or `**Returns**: description` without a type); raised exceptions SHALL be listed with their descriptions. Outside the full-page documentation of `library-documentation-markdown`, keywords whose documentation is not in Markdown format and has no argument, return or raises description SHALL render exactly as before, except for the corrections of the requirement "Robot-format tables and links convert to valid Markdown".
16+
A keyword without argument descriptions SHALL keep the argument table without the description column. When a return description exists it SHALL be shown with the return type (`**Return Type**: \`T\` — description`, or `**Returns**: description` without a type); on the full page, the names in `T` link to their data types by the requirement "Data types" of `library-documentation-markdown`. Raised exceptions SHALL be listed with their descriptions. Outside the full-page documentation of `library-documentation-markdown`, keywords whose documentation is not in Markdown format and has no argument, return or raises description SHALL render exactly as before, except for the corrections of the requirement "Robot-format tables and links convert to valid Markdown" and, in VS Code, the links of the requirement "Links in documentation open the Documentation Viewer" of `vscode-documentation-viewer`.
1717

1818
#### Scenario: Standard-library keyword on RF 7.5
1919
- **WHEN** the hover for `Log` (BuiltIn) is shown on RF 7.5
@@ -39,7 +39,7 @@ A keyword without argument descriptions SHALL keep the argument table without th
3939

4040
#### Scenario: Keyword without descriptions in a non-Markdown library
4141
- **WHEN** a keyword of a library documented in Robot, reStructuredText, HTML or plain-text format has no Google-style sections, or the installed Robot Framework is older than 7.5
42-
- **THEN** its hover is identical to the hover before this change, apart from escaped `|` characters in Robot-format table cells and link targets without a `\#` escape
42+
- **THEN** its hover is identical to the hover before this change, apart from escaped `|` characters in Robot-format table cells, link targets without a `\#` escape, and in VS Code the links to the Documentation Viewer
4343

4444
#### Scenario: Markdown library on an older Robot Framework
4545
- **WHEN** a library declares `ROBOT_LIBRARY_DOC_FORMAT = "MARKDOWN"` and is documented on RF 7.4
@@ -60,10 +60,10 @@ Signature help SHALL show, for the active parameter, its description followed by
6060

6161
### Requirement: Markdown reference links are resolved
6262

63-
In documentation declared as Markdown, reference-style links (`[Name]`, `[Name][]`, `[text][Name]`) whose target is a keyword of the same library, a type used by the library, a section of the library introduction or one of Libdoc's default targets (introduction, importing, keywords) SHALL NOT be rendered as literal brackets. In hover, signature help and completion, in the output of `robotcode doc keywords` and `robotcode doc keyword`, and in the `doc` and `short_doc` fields of the JSON output of `robotcode doc` they SHALL be rendered as inline code. In full-document views (REPL `.doc`, `robotcode doc lib` and `browse`, Markdown documentation view) they SHALL be rendered as in-document links, where a reference to a type links to the type's heading in the `Data types` section, by the requirement "Data types" of `library-documentation-markdown`. In the REPL keyword view they SHALL be rendered as navigable keyword links. Reference definitions declared in the library introduction SHALL be applied to keyword documentation. Links inside code spans and fenced code blocks, images and unknown targets SHALL be left unchanged. Matching SHALL ignore case and spaces, as Libdoc does.
63+
In documentation declared as Markdown, reference-style links (`[Name]`, `[Name][]`, `[text][Name]`) whose target is a keyword of the same library, a type used by the library, a section of the library introduction or one of Libdoc's default targets (introduction, importing, keywords) SHALL NOT be rendered as literal brackets. In hover, signature help and completion, in the output of `robotcode doc keywords` and `robotcode doc keyword`, and in the `doc` and `short_doc` fields of the JSON output of `robotcode doc` they SHALL be rendered as inline code; in VS Code, in hover, signature help, completion and the tooltips of the Keywords view, they SHALL be links to the Documentation Viewer by the requirement "Links in documentation open the Documentation Viewer" of `vscode-documentation-viewer`. In full-document views (REPL `.doc`, `robotcode doc lib` and `browse`, Markdown documentation view) they SHALL be rendered as in-document links, where a reference to a type links to the type's heading in the `Data types` section, by the requirement "Data types" of `library-documentation-markdown`. In the REPL keyword view they SHALL be rendered as navigable keyword links. Reference definitions declared in the library introduction SHALL be applied to keyword documentation. Links inside code spans and fenced code blocks, images and unknown targets SHALL be left unchanged. Matching SHALL ignore case and spaces, as Libdoc does.
6464

6565
#### Scenario: Keyword reference in a hover
66-
- **WHEN** the hover for `Log` is shown on RF 7.5
66+
- **WHEN** the hover for `Log` is shown on RF 7.5 to a language client other than the VS Code extension
6767
- **THEN** `[Set Log Level]` is rendered as `` `Set Log Level` `` and `[String representations]` as `` `String representations` ``
6868

6969
#### Scenario: Keyword reference in a full-document view
@@ -87,6 +87,10 @@ In documentation declared as Markdown, reference-style links (`[Name]`, `[Name][
8787
- **WHEN** a documentation contains `` `[Tags]` `` in a code span or `[1]` with a keyword-local definition
8888
- **THEN** they are rendered unchanged
8989

90+
#### Scenario: Keyword reference in a VS Code hover
91+
- **WHEN** the hover for `Log` is shown in VS Code on RF 7.5
92+
- **THEN** `Set Log Level` and `String representations` are links that show `BuiltIn` in the Documentation Viewer at that keyword and that section
93+
9094
### Requirement: Markdown library introductions are normalised
9195

9296
For libraries documented in Markdown, a `%TOC%` line in the introduction SHALL be replaced by a two-level table of contents of the introduction's headings; ATX headings SHALL be shifted one level down (`#` → `##`) as Robot-format headings are today; GitHub-style admonitions (`> [!NOTE]`, `> [!WARNING]`, …) SHALL be rendered as block quotes with a bold label; fenced code, tables and raw HTML SHALL be left unchanged. The backtick auto-linking applied to Robot-format documentation SHALL NOT be applied to Markdown documentation.
@@ -101,7 +105,7 @@ For libraries documented in Markdown, a `%TOC%` line in the introduction SHALL b
101105

102106
### Requirement: Robot-format tables and links convert to valid Markdown
103107

104-
When documentation in Robot Framework's format is converted to Markdown, on every surface and every supported Robot Framework version, a `|` inside the content of a table cell SHALL be escaped, so that every table row keeps the number of cells Robot Framework gives it. No link target SHALL contain the escaped `\#`: links converted from Robot-format links and URLs, and the links from backtick names to headings of the same documentation, SHALL be written with `#`. Link texts and all other text SHALL be converted as before, apart from the names in single backticks that the full page links (requirement "Names in Robot-format documentation" of `library-documentation-markdown`).
108+
When documentation in Robot Framework's format is converted to Markdown, on every surface and every supported Robot Framework version, a `|` inside the content of a table cell SHALL be escaped, so that every table row keeps the number of cells Robot Framework gives it. No link target SHALL contain the escaped `\#`: links converted from Robot-format links and URLs, and the links from backtick names to headings of the same documentation, SHALL be written with `#`. Link texts and all other text SHALL be converted as before, apart from the names in single backticks that the full page links (requirement "Names in Robot-format documentation" of `library-documentation-markdown`) and, in VS Code, the links of the requirement "Links in documentation open the Documentation Viewer" of `vscode-documentation-viewer`, which replace these links there.
105109

106110
#### Scenario: Pipe inside a table cell
107111
- **WHEN** the hover for `Should Match Regexp` (BuiltIn) is shown on RF 6.1
@@ -112,7 +116,7 @@ When documentation in Robot Framework's format is converted to Markdown, on ever
112116
- **THEN** the rendered documentation contains the link `[docs](http://example.com/x.html#frag)`
113117

114118
#### Scenario: Library introduction on an older Robot Framework
115-
- **WHEN** the hover for a `BuiltIn` import is shown on RF 6.1
119+
- **WHEN** the hover for a `BuiltIn` import is shown on RF 6.1 in a language client other than the VS Code extension
116120
- **THEN** it contains the links `[eval](http://docs.python.org/library/functions.html#eval)` and `[str](#str)`
117121
- **AND** no link target contains `\#`
118122

@@ -126,8 +130,8 @@ Library documentation SHALL show the scope of a library as Robot Framework's Lib
126130

127131
### Requirement: Links to headings use GitHub anchors
128132

129-
Links to headings within library documentation, such as the table of contents that replaces `%TOC%` and the links from backtick names to headings, SHALL point to the anchor that GitHub gives the heading, by the rule of the requirement "Anchors" of `library-documentation-markdown`.
133+
Links to headings within library documentation, such as the table of contents that replaces `%TOC%` and the links from backtick names to headings, SHALL point to the anchor that GitHub gives the heading, by the rule of the requirement "Anchors" of `library-documentation-markdown`. In VS Code, such a link carries that anchor to the Documentation Viewer instead, by the requirement "Links in documentation open the Documentation Viewer" of `vscode-documentation-viewer`.
130134

131135
#### Scenario: Library hover with a table of contents
132-
- **WHEN** the hover for a `DateTime` import is shown on RF 7.5
136+
- **WHEN** the hover for a `DateTime` import is shown on RF 7.5 in a language client other than the VS Code extension
133137
- **THEN** its table of contents links `` `TODAY` and `NOW` `` to `#today-and-now`

‎openspec/specs/library-documentation-markdown/spec.md‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ The `Keywords` section SHALL start with an index: a list with one link per keywo
7878

7979
### Requirement: Data types
8080

81-
With Robot Framework 6.1 or newer, the `Data types` section SHALL document every type that Libdoc documents for the library's keywords, each with its kind and documentation, the allowed values of an enumeration and the structure of a typed dictionary. A table of contents that replaces `%TOC%` SHALL list `Data types` after `Keywords` when the page has the section. In the introduction and in the documentation of keywords, including the descriptions of arguments, return values and exceptions, a reference to a documented type, as a Markdown reference link such as `[Color]` or as a name in single backticks such as `` `Color` `` in Robot Framework's format, SHALL link to the anchor that the requirement "Anchors" gives the type's heading, also when that anchor is numbered. Argument names, the argument and return types of the `Arguments:` parts, and code in double backticks in Robot Framework's format SHALL stay inline code, also when they equal the name of a type.
81+
With Robot Framework 6.1 or newer, the `Data types` section SHALL document every type that Libdoc documents for the library's keywords, each with its kind and documentation, the allowed values of an enumeration and the structure of a typed dictionary. A table of contents that replaces `%TOC%` SHALL list `Data types` after `Keywords` when the page has the section. In the introduction and in the documentation of keywords, including the descriptions of arguments, return values and exceptions, a reference to a documented type, as a Markdown reference link such as `[Color]` or as a name in single backticks such as `` `Color` `` in Robot Framework's format, SHALL link to the anchor that the requirement "Anchors" gives the type's heading, also when that anchor is numbered.
82+
83+
In the argument tables of the keywords and of the initializer, and in the return types, each name of a type that Libdoc maps to a documented type, such as `int` to `integer`, SHALL link to the anchor that the requirement "Anchors" gives that type's heading, also when that anchor is numbered, and SHALL stay inline code inside the link. The rest of a type, such as brackets, the values of a `Literal` and the names of types without documentation, SHALL stay inline code, and the members of a union SHALL stay separated by `|`. A type that names no documented type SHALL be written as before, and every row of an argument table SHALL keep its number of cells. Argument names and code in double backticks in Robot Framework's format SHALL stay inline code, also when they equal the name of a type.
8284

8385
#### Scenario: Enumeration
8486
- **WHEN** the page of a library with the keyword `paint(self, shade: Color)` and an `Enum` `Color` is rendered on RF 6.1 or newer
@@ -94,17 +96,31 @@ With Robot Framework 6.1 or newer, the `Data types` section SHALL document every
9496

9597
#### Scenario: Argument and code named like a type
9698
- **WHEN** the keyword of the scenario "Type reference" also has the argument `color: str`, and its Robot-format documentation also writes the code ``` ``color`` ```
97-
- **THEN** the reference to `Color` is the only link to `#color-enum`
98-
- **AND** the argument name `color`, the argument type `Color` and the code `color` are inline code
99+
- **THEN** the argument name `color` and the code `color` are inline code
100+
- **AND** the type of `shade` is the link ``[`Color`](#color-enum)``, and the type `str` of `color` links to the heading `string (Standard)`
99101

100102
#### Scenario: Type heading with a repeated anchor
101103
- **WHEN** the library of the scenario "Type reference" is documented in Markdown and also has the keyword `Color Enum`
102104
- **THEN** the heading of `Color Enum` has the anchor `color-enum` and the heading `Color (Enum)` the anchor `color-enum-1`
103-
- **AND** `[Color]` links to `#color-enum-1`
105+
- **AND** `[Color]` and the type of `shade` link to `#color-enum-1`
106+
107+
#### Scenario: Types of XML
108+
- **WHEN** the page of `XML` is rendered on RF 7.4 or 7.5
109+
- **THEN** in the argument table of `Parse Xml`, the type `Source` is the link ``[`Source`](#source-custom)`` and `bool` links to `#boolean-standard`
110+
- **AND** its return type is the link ``[`Element`](#element-custom)``
111+
112+
#### Scenario: Nested types, unions and literals
113+
- **WHEN** the page of a library is rendered on RF 7.0 or newer, whose keyword has the arguments `values: list[int]`, `limit: int | None` and `mode: Literal['a', 'b']`
114+
- **THEN** `list`, `int`, `None` and `Literal` link to their headings in `Data types`, the brackets and `'a', 'b'` are inline code, `int` and `None` are separated by `|`
115+
- **AND** every row of the argument table has as many cells as its header
116+
117+
#### Scenario: Type without documentation
118+
- **WHEN** the page of `BuiltIn` is rendered on RF 7.5
119+
- **THEN** the type `Collection` of the argument `container` of `Should Contain` is inline code
104120

105121
### Requirement: Names in Robot-format documentation
106122

107-
In documentation in Robot Framework's format, a name in single backticks SHALL link to the heading it names, as Libdoc's HTML links it, also when the name wraps across two lines of a paragraph and whatever text comes before it on the line. The link SHALL point to the heading whose title is the name, also when another heading has the same anchor text. This applies in the introduction and in the documentation of keywords, including the descriptions of arguments, return values and exceptions. The name can be a keyword, a section of the introduction, one of the default sections (introduction, importing, keywords) or a data type; data types are linked by the requirement "Data types". Names in headings and in preformatted text SHALL stay as they are. Argument names, the argument and return types of the `Arguments:` parts, and code in double backticks SHALL stay inline code, also when they equal the name of a keyword or a section, as they do for data types.
123+
In documentation in Robot Framework's format, a name in single backticks SHALL link to the heading it names, as Libdoc's HTML links it, also when the name wraps across two lines of a paragraph and whatever text comes before it on the line. The link SHALL point to the heading whose title is the name, also when another heading has the same anchor text. This applies in the introduction and in the documentation of keywords, including the descriptions of arguments, return values and exceptions. The name can be a keyword, a section of the introduction, one of the default sections (introduction, importing, keywords) or a data type; data types are linked by the requirement "Data types". Names in headings and in preformatted text SHALL stay as they are. Argument names and code in double backticks SHALL stay inline code, also when they equal the name of a keyword, a section or a data type; argument and return types link only to data types, by the requirement "Data types".
108124

109125
#### Scenario: Keyword and section names
110126
- **WHEN** the page of a library documented in Robot Framework's format is rendered, whose introduction has the section `= Section =` and whose keyword `Zeta Kw` is documented with `` `Alpha Kw` `` and `` `Section` ``

0 commit comments

Comments
 (0)