Skip to content

Draw four docs diagrams with Mermaid, and stop splitting code names - #384

Merged
smelfungus merged 1 commit into
masterfrom
docs-diagrams
Nov 6, 2026
Merged

smelfungus merged 1 commit into
masterfrom
docs-diagrams

Conversation

@smelfungus

Copy link
Copy Markdown
Member

Four diagrams on the docs site, and inline code that no longer splits mid-name.

Diagrams (Mermaid, which the theme loads only on a page that has one):

  • Color spaces: a new section, "How the spaces connect", with the tree every conversion climbs through, rooted at XYZ D65.
  • Architecture: the text sketch of an edit becomes a flowchart: the chroma slider sets the value in OkLCh once, the Okhsl sliders read it through one conversion, the OkLCh sliders through none.
  • Color pickers, "Over a value you hold": a sequence diagram of a controlled picker's round trip through your code.
  • State management, "A grey keeps its hue": a state diagram of a color going grey and coming back in its hue.

Code wrapping: the theme let inline code break at any character, so narrow table columns split names such as HsvColorPicker and colorpicker-material3. Code in a table now stays on one line and the table scrolls sideways; code in running text breaks at its spaces, and inside a name only when the name alone is wider than the line.

llms.txt: the script reads mkdocs.yml with a loader that keeps the superfences hook reference as text, since the safe loader rejects that tag.

Checked locally: zensical build --strict passes, the llms.txt step runs, and every diagram parses with the page's own Mermaid. Text measured in the browser at 2560 px and 390 px: no code name splits inside a table at either width.

The docs site renders ```mermaid blocks as diagrams; the theme loads Mermaid only on a page that has one. Four pages get one: Color spaces shows the tree every conversion climbs through, Architecture replaces its text sketch of an edit with a flowchart, Color pickers shows a controlled picker's round trip through the caller, and State management shows a grey keeping its hue.

The theme let inline code break at any character, so a narrow table column split names a reader copies (HsvColorPick-er, colorpicker-material3 at its hyphen). Code in a table now stays on one line and the table scrolls sideways; code in running text breaks at its spaces, and inside a name only when the name alone is wider than the line.

The llms.txt script reads mkdocs.yml with a loader that keeps the superfences hook reference as text, since the safe loader rejects that tag.
@smelfungus
smelfungus merged commit ca98349 into master Nov 6, 2026
4 checks passed
@smelfungus
smelfungus deleted the docs-diagrams branch November 6, 2026 05:18
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.

1 participant