Conversation
There was a problem hiding this comment.
Pull request overview
This PR merges the v0.1.6 release updates for the design system, including the new Stepper component, a refactor of the Content layout API, and associated docs/showcase updates.
Changes:
- Introduces the Stepper primitive and wires it into the showcase, docs, and component registry.
- Refactors Content from a compound API (
Content.Heading) to named exports (ContentHeading,ContentBody, etc.) and updates usages. - Updates release metadata and docs assets (version bump, changelog, README tweaks, lint ignores, token exposure adjustments).
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/component-registry.ts | Registers new Content named exports for MDX/component preview usage. |
| src/components/docs/MDXComponents.tsx | Minor cleanup of MDX component map comments. |
| src/components/docs/DocLayout.tsx | Switches docs layout to use Content for page wrapping. |
| src/components/ComponentShowcase.tsx | Adds a new Stepper section and updates Content usage. |
| src/app/docs/page.tsx | Updates docs index to new Content named exports. |
| src/app/docs/[...slug]/page.tsx | Simplifies MDX page rendering/metadata and adjusts not-found UI. |
| package.json | Bumps package version to 0.1.6. |
| lib_public/setup.css | Adds mappings for shade ramp tokens in the Tailwind @theme inline block. |
| lib/components/primitives/tooltip.tsx | Updates tooltip background/arrow classes to use text tokens. |
| lib/components/primitives/stepper.tsx | Refines Stepper state clamping and rewrites StepperHeader UI/behavior. |
| lib/components/primitives/stepper.stories.tsx | Updates stories to new Stepper behavior and adds advanced examples. |
| lib/components/layout/index.ts | Re-exports Content named exports instead of the previous set. |
| lib/components/layout/header.stories.tsx | Migrates examples from Content.* to named exports. |
| lib/components/layout/content.tsx | Refactors Content implementation to named exports and updates container styling. |
| lib/components/layout/content.stories.tsx | Updates stories to match the new Content API (removes ContentExample). |
| eslint.config.mjs | Ignores generated index.cjs.js / index.es.js artifacts. |
| docs/components/primitives/stepper.mdx | Adds Stepper documentation page and usage examples. |
| docs/components/layout/content.mdx | Updates Content docs to the named-export API. |
| README.md | Refreshes installation/usage/docs sections and project info. |
| CHANGELOG.md | Adds v0.1.6 entry summarizing changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <main> | ||
| <Content>{children}</Content> | ||
| </main> |
There was a problem hiding this comment.
DocLayout now wraps every docs page in <Content>, but some child pages (e.g. /docs index) already render their own <Content>, which results in nested containers (duplicated padding/max-width/spacing). Consider keeping the layout wrapper as a plain <main> container (as before) or standardize on having the layout provide Content and remove Content from the child pages.
| <article className="mx-auto p-10 space-y-8"> | ||
| <H1>Page Not Found</H1> | ||
| <P>The requested documentation page could not be found.</P> | ||
| </article> |
There was a problem hiding this comment.
The not-found branch adds its own p-10 / centering styles, but the docs route is already wrapped by DocLayout → Content (which applies padding/max-width). This likely causes double padding/inconsistent layout. Consider removing the extra container classes here and let the layout provide spacing.
| const [currentStep, setCurrentStep] = React.useState(initialStep); | ||
| const steps = React.Children.toArray(children); | ||
| const totalSteps = totalStepsProp ?? steps.length; | ||
| const totalSteps = Math.max(totalStepsProp ?? steps.length, 1); | ||
| const previousInitialStepRef = React.useRef(initialStep); |
There was a problem hiding this comment.
totalSteps defaults to React.Children.toArray(children).length, which counts StepperHeader/StepperContent/StepperFooter rather than the number of actual steps. This makes the default inference incorrect for the documented usage and can break navigation/progress unless totalSteps is always provided. Consider deriving the step count from StepperContent's children (or making totalSteps required).
| "use client"; | ||
|
|
There was a problem hiding this comment.
Content is a purely presentational component (no hooks/state) so marking the module as a Client Component forces unnecessary client-side JS and prevents Server Component usage. Remove the "use client" directive unless this file actually needs client-only APIs.
| "use client"; |
| <Content> | ||
| <Content.Heading>Documentation</Content.Heading> | ||
| <Content.Body> | ||
| <ContentHeading>Documentation</ContentHeading> | ||
| <ContentBody> |
There was a problem hiding this comment.
This page renders its own <Content> container, but DocLayout also wraps children with <Content>, causing nested Content containers (extra padding/max-width). Remove the outer <Content> here (keep ContentHeading/ContentBody) or stop wrapping with Content in DocLayout.
| interface PageData { | ||
| source: string; | ||
| } |
There was a problem hiding this comment.
The generic type argument to compileMDX<T>() represents the frontmatter shape, not page data. PageData currently defines { source: string }, which is unrelated to frontmatter and makes the typing misleading. Either omit the generic, or reintroduce a proper frontmatter type (and use the returned frontmatter) if you intend to type it.
| // Basic usage | ||
| <Stepper> | ||
| <StepperHeader steps={steps} /> | ||
| <StepperContent> | ||
| <YourStep1Content /> | ||
| <YourStep2Content /> | ||
| <YourStep3Content /> | ||
| </StepperContent> | ||
| </Stepper> |
There was a problem hiding this comment.
The usage example shows <Stepper> without totalSteps, but the current implementation infers totalSteps from direct Stepper children (which will include StepperHeader/StepperContent/StepperFooter and be wrong). Update the example to pass totalSteps={steps.length} (and consider adjusting the props docs text accordingly).
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| { | ||
| "private": false, | ||
| "name": "@e-infra/design-system", | ||
| "version": "0.1.5", |
No description provided.