WIP : generate the docs for the builtin element based on comments in builtins.slint#11356
Draft
WIP : generate the docs for the builtin element based on comments in builtins.slint#11356
Conversation
tronical
reviewed
Apr 16, 2026
tronical
reviewed
Apr 16, 2026
d8a651e to
0e6fa68
Compare
ec859f7 to
ef72d35
Compare
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).
3318322 to
97e3d01
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.slintThe 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.