feat(docs): per-chart reference pages + auto prop tables + CI deploy (#128)#144
Merged
Merged
Conversation
…128) Phase 2 of the docs site. Builds on the phase-1 Starlight scaffold (#135). Reference pages: every chart (9) and diagram (8) plus AutoChart now has a page with runnable examples and a prop table. The tables are AUTO-GENERATED from the library's TypeScript types — a build-time script (docs-site/scripts/gen-props.mjs) runs react-docgen-typescript over src/components, keeps our own props (BaseChartProps inherited, React DOM attrs dropped), and writes src/generated/props.json that the new <PropTable> Astro component renders. So the tables can't drift from the real props. gen:props is wired ahead of every dev/build. Also: a brand gallery page, every component linked from the index via LinkCard grids, a CI `docs` job that builds the site on PRs, and a combined Pages deploy that puts the playground at the site root and the docs under /docs. Drive-by fix: the root .gitignore had a bare `gallery` rule (for the generated repo-root render dir) that also matched docs-site/.../gallery/, so phase 1's gallery/vibes.md was silently never committed — the Vibes sidebar link would 404 on the live site. Anchored the rule to `/gallery` (+ `/nl-examples`) and committed the rescued vibes.md alongside the new brands.md. Verified: `npm run docs:build` clean (28 pages); every <PropTable> resolves (build throws otherwise); full internal-link sweep shows 0 broken targets. Closes #128 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Phase 2 of the docs site, building on the phase-1 Starlight scaffold (#135). Delivers the per-chart reference pages, auto-generated prop tables, galleries, and the CI build + Pages deploy from the issue.
Highlights
AutoChart, each with runnable examples and a prop table.docs-site/scripts/gen-props.mjsrunsreact-docgen-typescriptoversrc/componentsat build time, keeps our own props (inheritedBaseChartPropsincluded, React DOM attrs filtered), and emitssrc/generated/props.jsonthat a new<PropTable>Astro component renders. Zero drift from the real TS types.gen:propsruns ahead of everydev/build; the generated JSON is gitignored.LinkCardgrids; new brand gallery alongside the existing vibe gallery.docsjob builds the site on every PR.deploy-pages.ymlnow assembles a combined artifact — playground at the site root, docs under/docs— so both ship together.Drive-by fix (surfaced, not silent)
The root
.gitignorehad a baregalleryrule (for the generated repo-root render dir) that also matcheddocs-site/.../gallery/— so phase 1'sgallery/vibes.mdwas silently never committed, and the Vibes sidebar link would 404 on the live site. Anchored the rule to/gallery(+/nl-examples) and committed the rescuedvibes.mdnext to the newbrands.md.Verify
npm run docs:buildclean — 28 pages.<PropTable component="X">resolves (the component throws on a missing entry, so the build is the guard).docsjob added toci.yml.Acceptance check (#128)
docs:dev/docs:buildscripts (build now also runs prop generation)Closes #128
🤖 Generated with Claude Code