Rewrote Shade Storybook docs in conversational prose, added Terms section#27669
Rewrote Shade Storybook docs in conversational prose, added Terms section#27669peterzimon merged 1 commit intomainfrom
Conversation
ref https://linear.app/tryghost/issue/DES-1343/ - The previous docs read as bulleted reference material, fine for a machine but tedious for a human trying to learn the system. Rewrote introduction, architecture, tokens, primitives-guide, contributing, and component-contracts to lead with prose, weave examples into the text, and keep bullet lists for genuinely list-like content - Added a proper Terms section to architecture.mdx that defines tokens, primitives, components, recipes, layouts, features, and app — including the file-system-vs-entrypoint mismatch (features/ on disk vs. @tryghost/shade/patterns) that's been a quiet source of confusion - Documented the post-MS-4 state: Foundations sidebar group, the inputSurface recipe, KPI / charts / filters living under features/. Will land coherently once the two stacked consolidation PRs merge - No content lost — every rule, prop reference, and example from the old docs is preserved, just in a more readable shape - migration-root-imports.mdx left as-is; it's already a tight reference table and that's the right format for it
WalkthroughThis pull request comprehensively revises the Shade design system documentation across six MDX files. The updates introduce a new layered mental model for understanding Shade's organization (Tokens → Primitives → Components → Recipes → Features), reorganize foundational guides with simplified narratives and practical examples, and establish clearer contributor workflows. Changes include reworked architecture documentation, refined component contract definitions with structured agent templates, updated contribution guidance with code examples for variants and static properties, refreshed introductory content targeting monorepo consumption, simplified primitives and tokens guides with improved prop documentation, and consolidated conventions. All changes are documentation-only with no alterations to exported public APIs or TypeScript signatures. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/shade/src/docs/component-contracts.mdx`:
- Line 29: The wording incorrectly calls TrendBadge and MetricValue
"primitives"; update the text in the components/ui/ description to say they are
"smaller helpers" (or "smaller helpers like `TrendBadge` and `MetricValue`")
instead of "primitives" so it matches the Terms section that reserves
"primitives" for `Stack`, `Inline`, `Box`, `Container`, `Grid`, and `Text`; edit
the sentence referencing `TrendBadge` and `MetricValue` to use the corrected
phrase.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fd4dae47-2554-4961-ab9d-e6db4bfc1383
📒 Files selected for processing (6)
apps/shade/src/docs/architecture.mdxapps/shade/src/docs/component-contracts.mdxapps/shade/src/docs/contributing.mdxapps/shade/src/docs/introduction.mdxapps/shade/src/docs/primitives-guide.mdxapps/shade/src/docs/tokens.mdx
| `Button`, `Input`, `Field`, `Select`, `Tabs`, `Table`, `Dialog`, `DropdownMenu`, `Card`. | ||
|
|
||
| ## Scope (Wave A) | ||
| Other things in `components/ui/` (recipes like `inputSurface`, smaller helpers, primitives like `TrendBadge` and `MetricValue`) follow the same spirit but don't yet have formal rule documents. |
There was a problem hiding this comment.
Terminology conflict: TrendBadge and MetricValue are not "primitives" in Shade's vocabulary.
Line 29 labels TrendBadge and MetricValue as "primitives," but the architecture doc (and the Terms section you just wrote) defines primitives strictly as the six layout building blocks: Stack, Inline, Box, Container, Grid, Text. A reader coming from that page will be confused.
These are small helper components — a more accurate description would be "smaller helpers like TrendBadge and MetricValue."
✏️ Proposed fix
-Other things in `components/ui/` (recipes like `inputSurface`, smaller helpers, primitives like `TrendBadge` and `MetricValue`) follow the same spirit but don't yet have formal rule documents.
+Other things in `components/ui/` (recipes like `inputSurface`, smaller helpers like `TrendBadge` and `MetricValue`) follow the same spirit but don't yet have formal rule documents.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Other things in `components/ui/` (recipes like `inputSurface`, smaller helpers, primitives like `TrendBadge` and `MetricValue`) follow the same spirit but don't yet have formal rule documents. | |
| Other things in `components/ui/` (recipes like `inputSurface`, smaller helpers like `TrendBadge` and `MetricValue`) follow the same spirit but don't yet have formal rule documents. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/shade/src/docs/component-contracts.mdx` at line 29, The wording
incorrectly calls TrendBadge and MetricValue "primitives"; update the text in
the components/ui/ description to say they are "smaller helpers" (or "smaller
helpers like `TrendBadge` and `MetricValue`") instead of "primitives" so it
matches the Terms section that reserves "primitives" for `Stack`, `Inline`,
`Box`, `Container`, `Grid`, and `Text`; edit the sentence referencing
`TrendBadge` and `MetricValue` to use the corrected phrase.
Summary
Rewrites the Shade Storybook documentation pages so they read like prose written by a human, not bullet points generated by a machine. Adds a proper Terms section to the Architecture page that defines the words we throw around (tokens, primitives, components, recipes, layouts, features, app).
ref https://linear.app/tryghost/issue/DES-1343
What changed
Six docs rewritten:
features/on disk vs@tryghost/shade/patterns) that's been a quiet source of confusion.One doc left alone:
Why
The previous docs read as defensive, robotic, and bullet-heavy. Workable as machine-readable reference, frustrating to learn from. Storybook is meant to be the source of truth for the design system, and humans need it as much as agents do.
The rewrites:
Still useful for AI agents: the Terms section is now an explicit glossary an agent can ground its choices in, and the layer rules are stated plainly enough that "which layer does this belong in" has an answerable rule.