Repository navigation
refactor(primitives): move skeleton to primitives - #316
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the component catalog by moving Skeleton from the atoms tier to the primitives tier, updating root exports and package-consumption verification to ensure Skeleton remains consumable via both ESM and CJS entrypoints.
Changes:
- Move
Skeletonimplementation/tests/stories intosrc/components/primitives/skeleton. - Update
src/index.tsroot barrel exports soSkeletonis exported from the primitives tier (including its public types). - Extend
scripts/verify-package-consumption.mjsto assertSkeletonroot exports and type imports for both React 18 and React 19 consumers.
Reviewed changes
Copilot reviewed 4 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Moves the root export for Skeleton from atoms to primitives and re-exports its types. |
| src/components/primitives/skeleton/Skeleton.tsx | Adds the primitives-tier Skeleton component wrapper using the hook. |
| src/components/primitives/skeleton/useSkeleton.ts | Adds the primitives-tier hook computing classes and aria-hidden behavior. |
| src/components/primitives/skeleton/types.ts | Adds CVA variants + public prop/types for primitives-tier Skeleton. |
| src/components/primitives/skeleton/Skeleton.test.tsx | Adds/moves tests validating hook defaults and component a11y/prop forwarding. |
| src/components/primitives/skeleton/Skeleton.stories.tsx | Updates Storybook taxonomy to Primitives/Skeleton. |
| src/components/primitives/skeleton/index.ts | Adds primitives-tier barrel exports for Skeleton and its types. |
| scripts/verify-package-consumption.mjs | Extends consumer smoke tests to validate Skeleton root ESM/CJS exports and typing. |
| package.json | Adds pnpm overrides affecting resolved dependency versions. |
| pnpm-lock.yaml | Updates lockfile overrides and resolved versions to reflect the new pnpm overrides. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Skeletonfrom the atoms tier to the primitives tier.Skeletonresolves fromcomponents/primitives/skeleton.Skeletonand other core components.pnpm audit --audit-level highpasses again.Closes #302
Review scope
src/components/primitives/skeleton/*src/index.tsscripts/verify-package-consumption.mjspackage.jsonpnpm-lock.yamlSkeletonpnpm.overridesType of change
Workflow gates
Closes #NNNor maintainer approved an exception.status:approvedbefore implementation starts.In progress, branch/worktree recorded.<type>(<optional scope>): <description>..playwright-mcp,page-*.png,page-*.jpeg,*.md.playwright-output.Component evidence (required for component changes)
types.ts,use*.ts,Component.tsx,Component.test.tsx,Component.stories.tsx,index.ts.types.ts; JSX component has no state, CVA calls, or business logic.@defaultJSDoc intypes.ts(node scripts/verify-prop-default-docs.mjs).theme.css; no hardcoded colors or arbitrary color utilities.The component implementation was moved without behavior or visual changes; no new visual review capture was needed.
Accessibility evidence
Existing Skeleton tests moved with the component and still pass; no interactive behavior changed.
Validation evidence
pnpm run build✅pnpm run test✅ — 41 files, 910 tests passed.pnpm run build✅;pnpm run verify:package✅ — React 18 and React 19 consumers verified; ESM/CJS root exports includeButton,Divider,Skeleton, andSpacer.pnpm audit --audit-level high✅ — no high vulnerabilities remain; only 1 low and 3 moderate vulnerabilities remain below the CI threshold.Screenshots or recordings
N/A — no visual behavior changed.
Notes for reviewer
ea372ae2 refactor(primitives): move skeleton to primitives.db28a905 fix(deps): resolve high audit findings.review-9f58a8a40189973afor the Skeleton move andreview-7ccf787a3ff52df4for the dependency-audit fix.origin/mainfirst so the native pre-push gate could validate an update instead of an unsupported first-push create.