Repository navigation
README: show Mermaid and composition across formats; bring the canvasnet help up to date - #136
Merged
Merged
Conversation
- Quote the # colors of the montage and pad usage examples, which a shell read as a comment. - svg topic: Mermaid diagrams and document pages embed, links are read from the folder of the SVG file and below it, an input fragment overrides --theme too, and the notes, strict mode, and broken-file errors cover embedded diagrams. - mermaid topic: <img src> in labels, the fragments of a picture link, and the w/h advice; limits topic counts <img> tags; vega-lite topic: the image mark can show a Mermaid diagram. - render, info, and montage usages: Mermaid diagrams and theme fragments, the info fragment rules, and that a fragment is the only way to set a chart parameter or a Mermaid theme in a montage. - User guide: the same statements in the tool, Vega-Lite, and Mermaid guides. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- showcase.png is a 4x2 grid with a Mermaid flowchart panel and a composition panel. - New composition.png: an SVG page that embeds a Mermaid flowchart whose nodes show an OpenSCAD model and a Vega-Lite chart, one OpenSCAD model twice through def. fragments, and a sequence diagram with #theme=dark. - New mermaid-gallery.png: six Mermaid diagram types from the user guide examples. - README: new Composition section (nesting, fragments, flatten), Mermaid gallery, and updated captions. - render-images.ps1 draws and checks the new images; docs/images/README.md describes their sources. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The documentation inaccurately describes MaxImages as a picture count even though the implementation limits resolver calls, so both new explanations need correction.
2 open issues
What changed in this PR
This documentation-focused pull request updates the README and user-facing CanvasNet help to showcase Mermaid rendering and composition across formats, while synchronizing related guides, examples, source fixtures, and image-generation checks.
Changes:
- Added Mermaid and nested composition examples, source fixtures, and image-generation support.
- Updated README, CLI help, and user guides for Mermaid embedding, fragments, SVG resolution, limits, diagnostics, and Vega-Lite image marks.
- Corrected shell-quoting examples and updated help-drift test expectations.
| File | Description |
|---|---|
| test/DemaConsulting.CanvasNet.Tool.Tests/Commands/InputFragmentTests.cs | Updates help-drift assertions for the revised input-fragment and theme wording. |
| src/DemaConsulting.CanvasNet.Tool/Commands/RenderCommand.Verbs.cs | Quotes the hash-prefixed color in the pad usage example. |
| src/DemaConsulting.CanvasNet.Tool/Commands/RenderCommand.cs | Updates render usage documentation for Mermaid embedding and theme fragments. |
| src/DemaConsulting.CanvasNet.Tool/Commands/MontageCommand.cs | Documents Mermaid fragments and quotes the montage background-color example. |
| src/DemaConsulting.CanvasNet.Tool/Commands/Help/vega-lite.json | Documents Mermaid diagrams as supported Vega-Lite image marks. |
| src/DemaConsulting.CanvasNet.Tool/Commands/Help/svg.json | Expands SVG documentation for Mermaid embedding, fragments, folders, diagnostics, and strict mode. |
| src/DemaConsulting.CanvasNet.Tool/Commands/Help/mermaid.json | Documents Mermaid label images, image fragments, embedded formats, and image limits. |
| src/DemaConsulting.CanvasNet.Tool/Commands/Help/limits.json | Updates Mermaid picture-limit documentation to include images in labels. |
| src/DemaConsulting.CanvasNet.Tool/Commands/DiscoveryCommands.cs | Updates info usage text for diagram counts and fragment validation. |
| README.md | Adds Mermaid and composition showcases, linked-picture guidance, and flattening documentation. |
| docs/user_guide/canvas-net-vega-lite.md | Documents Mermaid diagrams as Vega-Lite image sources. |
| docs/user_guide/canvas-net-tool.md | Synchronizes info, Vega-Lite, and montage guidance with current behavior. |
| docs/user_guide/canvas-net-mermaid.md | Documents fragments and image-link behavior for Mermaid diagrams. |
| docs/images/showcase/release.mmd | Adds the themed Mermaid sequence diagram used by the composition example. |
| docs/images/showcase/pipeline.mmd | Adds a Mermaid flowchart containing OpenSCAD and Vega-Lite pictures. |
| docs/images/showcase/output.vl.json | Adds the Vega-Lite chart embedded in the Mermaid composition. |
| docs/images/showcase/flowchart.mmd | Adds the Mermaid flowchart used in the showcase. |
| docs/images/showcase/explode.scad | Updates provenance comments for reuse in the composition example. |
| docs/images/showcase/composition.svg | Defines the nested SVG composition of Mermaid, OpenSCAD, Vega-Lite, and other panels. |
| docs/images/render-images.ps1 | Generates and checks the expanded showcase, composition image, and Mermaid gallery. |
| docs/images/README.md | Documents image sources, dimensions, provenance, and regeneration procedures. |
Review effort: Lite
…when measured and again when drawn Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The review found no active issues, with the documentation, help text, fixtures, and related expectations updated consistently for the described Mermaid and composition changes.
No open issues 🎉
2 resolved since last review
Review effort: Lite
This was referenced Nov 16, 2026
This was referenced Nov 16, 2026
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.

Pull Request
Description
This refreshes the README images to show the newer features, Mermaid and composition across formats, and corrects the
canvasnethelp, which had fallen behind several features.README images (all drawn and CI-checked by
docs/images/render-images.ps1 -Check)showcase.pngis now a 4x2 grid. It adds a Mermaid panel (a flowchart with a subgraph) and a Composition panel to SVG, OpenSCAD, Vega-Lite, PDF, PowerPoint and Visio.composition.png(new), a "System overview" page drawn from one SVG (docs/images/showcase/composition.svg):#def.explode=0and#def.explode=1, with a fixed camera so both share a scale;#theme=dark.Each panel prints the link that draws it.
mermaid-gallery.png(new): sequence, class, state, gantt, mindmap and git graph in one montage, like the Vega-Lite gallery.README text: a short Composition section (nesting, fragments, a small SVG snippet, and
canvasnet flattenfor self-contained SVGs). Mermaid is now in the format list.Help review: every topic, every command's usage text and every example was checked against current behavior, and every example was run with the built tool. Fifteen findings are fixed, each in the help and the matching user-guide text (drift tests enforce that they stay identical):
#color is read as a shell comment (montage --background #333333,pad --pad-color #336699); both are now quoted.--theme), unsupported options,--strict, diagnostics and the folder rule now include Mermaid diagrams;<img>tags in labels, and those count toward the picture limit.render,infoandmontage: fragments and embedding mention Mermaid and#theme=, andinfodescribes every diagram type's counts.Type of Change
Related Issues
Requested in review: show composition in the README and keep the tool help up to date. There is no issue to close.
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
pwsh ./build.ps1. It ran, but 1-3 Scad timing tests failed while another build was running on the same machine. This PR has no Scad changes, and those tests pass when run alone. These ran:dotnet build src/DemaConsulting.CanvasNet.Tool -c Release: 0 warnings, 0 errorsdotnet test test/DemaConsulting.CanvasNet.Tool.Tests -c Release: passed (3,660 on net8, net9 and net10, including the help drift tests)pwsh docs/images/render-images.ps1 -Checkwith the local tool: passedCode Quality
Quality Checks
Please run the following checks before submitting:
pwsh ./lint.ps1passed (exit 0)Testing
InputFragmentTests.Documentation
Additional Notes
The images grow by about 140 KB in total (showcase 270→232 KB, plus composition 166 KB and the Mermaid gallery 111 KB).