Skip to content

Merge version 0.1.6 release#54

Open
romanaduraciova wants to merge 13 commits intomainfrom
dev
Open

Merge version 0.1.6 release#54
romanaduraciova wants to merge 13 commits intomainfrom
dev

Conversation

@romanaduraciova
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +131 to 133
<main>
<Content>{children}</Content>
</main>
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +106 to +109
<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>
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The not-found branch adds its own p-10 / centering styles, but the docs route is already wrapped by DocLayoutContent (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.

Copilot uses AI. Check for mistakes.
Comment on lines 51 to +54
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);
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment on lines +1 to +2
"use client";

Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"use client";

Copilot uses AI. Check for mistakes.
Comment thread src/app/docs/page.tsx
Comment on lines 14 to +16
<Content>
<Content.Heading>Documentation</Content.Heading>
<Content.Body>
<ContentHeading>Documentation</ContentHeading>
<ContentBody>
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +15 to 17
interface PageData {
source: string;
}
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +100
// Basic usage
<Stepper>
<StepperHeader steps={steps} />
<StepperContent>
<YourStep1Content />
<YourStep2Content />
<YourStep3Content />
</StepperContent>
</Stepper>
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread package.json
{
"private": false,
"name": "@e-infra/design-system",
"version": "0.1.5",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain this please

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.

4 participants