Skip to content

UI Library docs: page-per-component + source-generated tables (3/3)#46

Open
librowski wants to merge 7 commits into
ui-consumersfrom
ui-docs
Open

UI Library docs: page-per-component + source-generated tables (3/3)#46
librowski wants to merge 7 commits into
ui-consumersfrom
ui-docs

Conversation

@librowski

@librowski librowski commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Part 3 of 3. Stacked on #45 (base branch librowski/ui-consumers) - review/merge #44 then #45 first. This PR's diff is only the documentation work.

Summary

Builds the UI Library documentation in apps/docs (Starlight): a page-per-component reference (twin to the old Overflow UI docs) with live interactive examples, props and CSS-variable tables generated from source (no hand-maintained tables), and a Design Tokens pipeline page.

Changes

Docs site

  • React island support added (@astrojs/react); @workflowbuilder/ui styles loaded via Starlight customCss (safe - no global reset; tokens follow the Starlight light/dark theme).
  • New UI Library sidebar section: Overview, Design tokens, UI Components (18 pages), Diagram Components (5 pages). Each component page has a live example (React island), usage, props, and CSS variables.
  • Rebranded the remaining "Overflow UI" prose (architecture / design-system / faq) to @workflowbuilder/ui on Base UI.

Source-generated API tables

  • apps/docs/scripts/generate-ui-api.mjs runs TypeDoc over the @workflowbuilder/ui barrel to extract per-component props (type / required / default / description), and extracts --ax-public-* CSS variables from the stylesheets, into a git-ignored ui-api.json. Rendered inline via PropsTable / CssVariablesTable Astro components. Wired into docs dev / build.
  • To make TypeDoc extract cleanly, component prop types are now named + exported through the @workflowbuilder/ui barrel, with @default JSDoc tags. This is the only packages/ui change in this PR and is additive.

Design tokens

  • New page documenting the tokens.json (Figma) → Style Dictionary → --ax-* CSS pipeline, theming, customization, regeneration, and the known "missing token" gaps.

Verification

  • build:docs green (177 pages); docs typecheck has no errors in the new files (only the 4 pre-existing head.astro / sidebar.astro errors).
  • Rendered in a browser: live examples interactive (switch toggles, modal opens), props/CSS tables render from generated data, theme follows Starlight.

Notes

  • Props/CSS tables are fully source-driven - regenerated on every docs build, never drift.
  • The "Overflow" product upsell card (overflow-card.astro) is intentionally left as-is (advertises the commercial product, not the vendored library).

…tyle props/CSS tables

Wrap every UI Library example in a shadow-DOM ComponentPreview so components
are styled only by @workflowbuilder/ui (isolated from Starlight CSS), shown in
a fixed 2:1 dotted preview box that matches the original Overflow UI docs.
Collapse each example island to a single representative instance.

Rework the generated Props and CSS-variable references from tables into card
lists: props show a 'required' chip (required-first) instead of a line-wrapping
'?' marker, with Type/Default/description rows; CSS variables group into
Color/Size. Drop the now-unused example-frame styles.
Give the Edge, NodeIcon, NodeDescription and NodePanel pages the same shadow-DOM
ComponentPreview the UI components use, rendering each as a standalone example
(NodePanel compositions; EdgeLabel variants positioned relatively outside a
canvas) for parity with the original Overflow UI docs. NodeAsPortWrapper stays
props-only, matching the reference. Adds @phosphor-icons/react to the docs app
for the example icons.
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.

2 participants