docs(readme): install and a runnable example come before the second showcase - #496
Conversation
…howcase Ninety-one lines and twelve images stood between the title and ## Installation. Most of that was a second showcase: thirty-five lines demonstrating the PowerPoint backend, with two renders and a screenshot, before the reader had seen one line of the authoring API. A reader who came for a PDF met a beta deck exporter first. That section moves below "Next steps" — after a reader has written a document, "the same session also emits a deck" is a payoff rather than a detour. Install now sits fifty-two lines in, behind nine images, seven of which are badges. The "Upgrading from 1.x" note moves into Installation, where an upgrader is already headed. Two directional words invert with the move and are fixed. Hello world opened with eight imports and eight public types while the tutorial it links to two lines below opened with four. The minimal version leads now, copied from that tutorial so it is the same first program; the styled one keeps its place directly beneath under the heading it was always earning, "Make it cinematic", and points at the committed preview of the example that renders the whole family. The ## Hello world heading itself is unchanged: an in-page link depends on it and no test validates anchors. Also links docs/capabilities.md from the landing page — until now it was reachable only through the documentation index. ./mvnw -B -ntp clean verify — BUILD SUCCESS, 692 tests in the closing module. DocumentationCoverageTest still finds all four canonical tokens; the styled block remains their only source. DocumentationSnippetCompileTest compiles the new fence under a fresh id.
1725bb0 to
2d215ef
Compare
|
Blocker fixed, and you were right about the deeper problem: the sentence was mine and the gate could never have caught it. The README example is now a complete file. Verified the way a reader would, not the way the gate does: extracted the fence verbatim from README.md into On Minor applied:
Head is now |
Why
Ninety-one lines and twelve
<img>tags stood between the title and## Installation. Most of that was a second showcase: the "One source → a PDF and an editable PowerPoint deck" section — thirty-five lines, two renders and a PowerPoint screenshot — sitting before the reader had seen a single line of the authoring API. A reader who came for a PDF met a@Betadeck exporter first.And the first snippet they could copy was forty-two lines with eight imports and eight public types, two lines above a link to a tutorial whose own first example is sixteen lines and four types.
What changed
### Next steps. After a reader has written a document, "the same session also emits a deck" reads as a payoff instead of a detour.## Installationmoves from line 92 to line 53: 52 lines and 9 images precede it, seven of the nine being badges. The banner render and## Why GraphComposedeliberately stay above it — for a rendering library the output image is the reason to keep reading.See [Which artifact?](#installation) below→above, and the in-fence commentsee Hello world below→above. The third, "the page below", is left alone — its referent travels with the block.## Installation, where an upgrader is already headed.## Hello worldnow leads with the sixteen-line example, copied verbatim from docs/first-document.md so the landing page and the tutorial teach the same first program. The styled block keeps its place directly beneath as### Make it cinematic— which is what it was always demonstrating — and points atSectionPresetsExampleand its committed preview, so the claim is shown rather than asserted.docs/capabilities.mdis linked from## Documentation. It had two inbound links in the whole repo, neither from the landing page.What I deliberately did not do
No new PNG of the styled example. The plan called for one; the repository says no.
CommittedAssetDriftTestasserts set equality on the files directly underassets/readme/againstRASTER_FIGURES— the enumerated register of figures nothing can verify. There is no example that renders a Hello-world page, so a new PNG could only be added by declaring it unverifiable, in the same release whose CHANGELOG states that a committed preview cannot fall behind the code that renders it.cut-release.ps1stages onlyassets/readme/examplesand the banner, so it would also freeze at whatever version it was first rendered at. Linking an existing, gate-covered preview says the same thing and stays true.## Hello worldkeeps its heading text. README.md links#hello-worldfrom the API table,CanonicalSurfaceGuardTest.publicMarkdownLinksShouldResolveskips#targets, and 13 files linkREADME.md#installation. Heading text on this page is effectively public API; the new subheading is added below rather than replacing anything.Verification
./mvnw -B -ntp clean verify—BUILD SUCCESS, exit 0, 692 tests in the closing module.The guards that constrain this file specifically:
DocumentationCoverageTest(5) — README must containGraphCompose.document(,DocumentSession,document.pageFlow(andDocumentTextStyle. The styled block is the only source of the last two, which is why it is kept intact rather than trimmed; the new minimal fence keeps the variable nameddocument, so it carriesdocument.pageFlow(as well.DocumentationSnippetCompileTest(6) — the new fence carries<!-- doc-example: id=readme-root-minimal mode=method -->, an id that collides with none of the thirteen in use and sanitizes to a distinct unit name. Its body already compiled elsewhere underfirst-document-smallest.CanonicalSurfaceGuardTest(11) — every relative link still resolves.DocsBoldFaceGuardTest(1) — the styled block'sFontName.HELVETICA+.decoration(BOLD)is untouched.Diff is 71/39 on a 400-line file — checked, because this repo's
autocrlfwill otherwise present a whole-file rewrite.Lane: docs. No production code, no public API.