Repository navigation
docs(tooling): explain Trax in five minutes, with figures - #118
Merged
Merged
Conversation
People shown Trax open the docs to learn what it is, and the docs home led with trains, junctions, the mediator and the scheduler before saying what any of it is for. Add an explanation page, "Trax in five minutes": the problem, the idea, a railway analogy, the checkout machine, the PlaceOrder train, how the server decides a move, who drives it, and what is recorded. One SVG figure per idea, no code, on the book's own example. The docs home now opens with the one-line pitch, a figure and a link to the page, then four reading paths instead of a sixteen-item list. What Trax does points to the page and draws its diagram as a figure. The landing hero links the page. Figures live in Trax.Docs/images and sync-docs.sh copies them to /docs-images/. On a narrow screen a figure scrolls in its own box rather than shrinking. ImagesResolveTests keeps the references, the files and the alt text in step, and writing-docs.md documents the convention.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
The intro now opens with what a state machine is (a traffic light), then the railway picture with guards and junctions, the checkout as a map and a table, and the book's checkout machine in C#. It adds how the server checks a move, where Trax sits around an AI agent, and the Board sample with the refusals an agent gets back, and ends with a table of one-line explanations for different readers. Every figure uses one colour per idea: teal states, lavender moves, amber guards, blue trains, pink junctions, orange failures. They are drawn by Trax.Docs/tools/figures/draw.py, so they stay consistent when one changes.
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.
A newcomer can learn what Trax is for from the docs, in pictures, before any code
Background
The docs are typed by kind (tutorial, how-to, explanation, reference), and the home page,
index.md, routes into them. Pages are CommonMark rendered by the site; until now no page used animage, so every diagram was an ASCII fence.
Problem
Example
A reader opens
/docsknowing only that Trax is "a .NET framework".The new page walks the book's checkout from end to end in eleven figures, for example:
How this solves it
ImagesResolveTestsfails on an image outside/docs-images/, a file that is not inimages/,empty alt text, or a figure no page shows.
writing-docs.mdgains a Figures section with theconvention.
Architectural hinges
Trax.Docs/introduction.md: the page itself; every figure is drawn for it.Trax.Docs/index.md: the reading paths that replace the old start list.Trax.Docs/tools/figures/draw.py: every figure, and the colour key they share.Trax.Website/scripts/sync-docs.sh: copiesimages/topublic/docs-images/, which gitignores, so the site shows the figures of the commit it was built from.
Trax.Website/src/components/mdx/MdxComponents.tsx(img): a/docs-images/figure keepsa readable width on a phone and scrolls sideways instead of shrinking.
Trax.Docs/tests/Trax.Docs.Tests/Tests/ImagesResolveTests.cs: keeps references, files andalt text in step.