Skip to content

WIP : generate the docs for the builtin element based on comments in builtins.slint#11356

Draft
ogoffart wants to merge 7 commits intomasterfrom
olivier/builtins-docs-generator
Draft

WIP : generate the docs for the builtin element based on comments in builtins.slint#11356
ogoffart wants to merge 7 commits intomasterfrom
olivier/builtins-docs-generator

Conversation

@ogoffart
Copy link
Copy Markdown
Member

Part of #104

The goal here is to make sure there is less inconsistency in the documentation.
Use /// for normal documentation comment and //! for "section" documentation or documentation of property that are not in the builtins.slint

The Text of the documentation should be unchanged (modulo bug)

This PR still contain the generated files, at this point, so we see them in the diff. But Before merging that we should remove the generated files from the git tree.

Comment thread internal/compiler/builtins.slint Outdated
Comment thread internal/compiler/builtins.slint Outdated
@ogoffart ogoffart force-pushed the olivier/builtins-docs-generator branch from d8a651e to 0e6fa68 Compare April 17, 2026 10:24
@ogoffart ogoffart force-pushed the olivier/builtins-docs-generator branch from ec859f7 to ef72d35 Compare April 17, 2026 13:42
The doc generator emits inherited properties first, then the element's
own properties.  Reorder the hand-written mdx files so that they already
follow this order, to minimize the diff when the generator takes over.
Move the enum/struct/keys mdx generation from xtask/slintdocs and
the screenshot generation from tools/docsnapper into a single new
tool at docs/slint-doc-generator with subcommands:
  generate-mdx, screenshots, build-astro.
Running without a subcommand generates mdx, screenshots, and
builds astro. Update CI workflows and READMEs.
…lint.

Instead of writing <CodeSnippetMD> XML tags in doc comments, screenshot
attributes are now placed directly on the code fence info string:

    /// ```slint playground imageAlt="example" width="200" height="200"

The doc generator transforms these into <CodeSnippetMD> wrappers with
auto-generated numbered image paths (e.g. rectangle-1.png, rectangle-2.png).
@ogoffart ogoffart force-pushed the olivier/builtins-docs-generator branch from 3318322 to 97e3d01 Compare April 17, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants