feat(storybook): show component status + DoD checklist on docs pages#4724
Merged
Conversation
Injects the maturity status and Definition-of-Done checklist (from the component-status API) into every component docs page via the docs container. Also makes getComponentStatus matching tiered so fully-qualified or prefixed Storybook titles resolve to the correct entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
Contributor
📦 Alpha Package Version PublishedUse Use |
Contributor
🔍 Visual review for your branch is published 🔍Here are the links to: |
Contributor
✅ No breaking public API changesNo public exports were removed, renamed, or had existing props/types changed in a breaking way compared to Comparing
|
Contributor
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
…ponentStability The badge label, summary line, and checklist visibility now come from the component-status data (alongside the existing requirement labels/hints), so Storybook and any consuming app render identical content. Adds an exported ComponentStability component that takes a componentName prop and renders the status; the Storybook docs panel is now a thin wrapper around it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…izontal padding Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Use text-lg (16px) for the status title and summary, and add an h2 section heading. text-md is not a defined f0 utility, so text-lg is used. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the redundant "Status" label; "Maturity level" and "Importing this component" are now h3 section headings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a `criteria` list to the docQuality requirement (in the API, so it stays consistent everywhere) and render it under the checklist item instead of an abstract sentence. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add an effective status: a component is stable only if tagged stable AND it meets the full checklist; otherwise (untagged, below bar, or meeting the bar without the tag) it is experimental. The badge shows effective status. - Add a play-function check and raise the doc-quality bar to "good" per the lifecycle Definition of Done (PR #4253). - Show the subtitle for every checklist point (met and unmet), for stable and experimental alike. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Emit granular MDX doc signals from the generator and mark each doc-quality sub-criterion (sections+props, DoDonts, when-not-to-use, 3+ examples) with its own check/cross instead of a plain bullet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…iner Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The manager (esbuild bundle) can't run the Vite virtual module, so main.ts computes the effectively-experimental set at startup and writes a generated, gitignored file the manager imports for its sidebar renderLabel. A drift test keeps the generator's effective-status helper in sync with the TS policy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… after sidebar label - Component Status table now shows effective status + declared tag + the full requirement checks (tests, play, MDX, good docs), matching the panel/sidebar. Summary cards count effective stable and tagged-but-below-bar. - Move the sidebar experimental warning dot to after the component name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…mental marker Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eclared-tag column - Extract the story meta title from the meta object, not the first title: in the file (sample-data/args objects with a title: were surfacing as components, e.g. 'Cannot access payroll documents'). - Exclude internal (ui/, lib/, or the internal tag) — internal is not a maturity level per the Definition of Done. - Drop the 'Declared tag' column from the status table and remove Internal from the status filter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generate a leaf → effective-status map at startup (experimental + deprecated) and render 🚧 for experimental and ❌ for deprecated in the sidebar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Maturity level panel (ComponentStability) now conveys the status and DoD, superseding the old 'don't use experimental components in production' F0Alert. Co-Authored-By: Claude Opus 4.8 <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.
Description
Surfaces each component's maturity status and Definition-of-Done checklist as a reusable, self-consistent UI. All display text (badge label, summary line, checklist labels and remediation hints) is now part of the
component-statusdata, and a single exportedComponentStabilitycomponent renders it — so the Storybook docs page and any consuming app (e.g. a factorial-composer page) show identical content. Reuses the API from #4719; renders nothing on non-component pages.Screenshots (if applicable)
Rendered on every component docs page under the title: a "Status" heading, a maturity badge, a one-line summary, and the checklist with per-item detail for unmet requirements. (Verified in a live Storybook — Card, Alert, and a non-component page.)
Implementation details
ComponentStabilitycomponent —<ComponentStability componentName="F0Card" />— that looks up the status and renders the badge, summary, and checklist; renders nothing for unknown names. Accepts an optionalcomponentsdataset override for testingcomponent-statusdata —label(badge),summary(top line), andshowChecklistnow come fromevaluateComponentStatus, next to the existing per-requirementlabel/detail— so text lives in one place and stays consistent across Storybook and consumersComponentStabilityin under the title)getComponentStatusname matching tiered (exact full-name → leaf-level → suffix) so fully-qualified titles (Data Collection/Visualizations/Card) and prefixed autodocs titles (Components/F0Card) resolve to the correct entrylabel/summary/showChecklist), the title-resolution tiers, and a render test forComponentStabilityUsage from another repo: