Skip to content

feat: add storybook#1270

Open
sacrosanctic wants to merge 28 commits intonpmx-dev:mainfrom
sacrosanctic:storybook
Open

feat: add storybook#1270
sacrosanctic wants to merge 28 commits intonpmx-dev:mainfrom
sacrosanctic:storybook

Conversation

@sacrosanctic
Copy link
Contributor

@sacrosanctic sacrosanctic commented Feb 9, 2026

In this PR

  • setup storybook
  • outline how storybook will integrate with the project

todo

  • setup chromatic @JReinhold
  • mocks for nuxt modules

considerations

  • story scope and converage
  • storybook and vitest has redundant tests
  • define component boundaries

notes

notes to self

  • LicenseDisplay - should handle the nullish case internally
  • DownloadAnalytics - should be multiple components
  • Button - full width block is not full width
  • Button - ariakeyshortcut is unused

@vercel
Copy link

vercel bot commented Feb 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Feb 14, 2026 1:51am
npmx.dev Ready Ready Preview, Comment Feb 14, 2026 1:51am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Feb 14, 2026 1:51am

Request Review

@codecov
Copy link

codecov bot commented Feb 9, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1708 1 1707 6
View the top 1 failed test(s) by shortest run time
test/unit/a11y-component-coverage.spec.ts > a11y component test coverage > should have accessibility tests for all components (or be explicitly skipped)
Stack Traces | 0.0105s run time
AssertionError: Missing a11y tests for 81 component(s):
  - AppFooter.vue
  - AppHeader.vue
  - AppLogo.vue
  - BaseCard.vue
  - BlueskyPostEmbed.client.vue
  - BuildEnvironment.vue
  - Button/Base.vue
  - CallToAction.vue
  - Code/DirectoryListing.vue
  - Code/FileTree.vue
  - Code/MobileTreeDrawer.vue
  - Code/Viewer.vue
  - CollapsibleSection.vue
  - ColumnPicker.vue
  - Compare/ComparisonGrid.vue
  - Compare/FacetCard.vue
  - Compare/FacetRow.vue
  - Compare/FacetSelector.vue
  - Compare/LineChart.vue
  - Compare/PackageSelector.vue
  - Compare/ReplacementSuggestion.vue
  - DateTime.vue
  - DependencyPathPopup.vue
  - Filter/Chips.vue
  - Filter/Panel.vue
  - Header/AccountMenu.client.vue
  - Header/ConnectorModal.vue
  - Header/SearchBox.vue
  - Input/Base.vue
  - LicenseDisplay.vue
  - Link/Base.vue
  - LoadingSpinner.vue
  - Org/MembersPanel.vue
  - Org/OperationsQueue.vue
  - Org/TeamsPanel.vue
  - Package/AccessControls.vue
  - Package/Card.vue
  - Package/ChartModal.vue
  - Package/ClaimPackageModal.vue
  - Package/Compatibility.vue
  - Package/Dependencies.vue
  - Package/DeprecatedTree.vue
  - Package/InstallScripts.vue
  - Package/Keywords.vue
  - Package/List.vue
  - Package/ListControls.vue
  - Package/ListToolbar.vue
  - Package/Maintainers.vue
  - Package/ManagerSelect.vue
  - Package/MetricsBadges.vue
  - Package/Playgrounds.vue
  - Package/Replacement.vue
  - Package/Sidebar.vue
  - Package/Skeleton.vue
  - Package/SkillsCard.vue
  - Package/Table.vue
  - Package/TableRow.vue
  - Package/Versions.vue
  - Package/VulnerabilityTree.vue
  - PackageProvenanceSection.vue
  - PaginationControls.vue
  - ProvenanceBadge.vue
  - Readme.vue
  - ReadmeTocDropdown.vue
  - SearchProviderToggle.client.vue
  - SearchSuggestionCard.vue
  - Select/Base.vue
  - Select/Field.vue
  - Settings/AccentColorPicker.vue
  - Settings/BgThemePicker.vue
  - Settings/Toggle.client.vue
  - Tag/RadioButton.vue
  - Tag/Static.vue
  - Terminal/Execute.vue
  - Terminal/Install.vue
  - Tooltip/Announce.vue
  - Tooltip/App.vue
  - Tooltip/Base.vue
  - User/Avatar.vue
  - VersionSelector.vue
  - ViewModeToggle.vue

To fix: Add tests in test/nuxt/a11y.spec.ts or add to SKIPPED_COMPONENTS in test/unit/a11y-component-coverage.spec.ts with justification.: expected 81 to equal +0

- Expected
+ Received

- 0
+ 81

 ❯ test/unit/a11y-component-coverage.spec.ts:166:12
 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab_@types+node_310e5dad6395fccdf5f424a1dccab9b9/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/index.js:145:14
 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab_@types+node_310e5dad6395fccdf5f424a1dccab9b9/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/index.js:915:28
 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab_@types+node_310e5dad6395fccdf5f424a1dccab9b9/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/index.js:1243:24
 ❯ runWithTimeout node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab_@types+node_310e5dad6395fccdf5f424a1dccab9b9/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/index.js:1209:12
 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab_@types+node_310e5dad6395fccdf5f424a1dccab9b9/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/index.js:1653:42
 ❯ Traces.$ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab_@types+node_310e5dad6395fccdf5f424a1dccab9b9/node_modules/@.../dist/chunks/traces.CCmnQaNT.js:142:29
 ❯ trace node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab_@types+node_310e5dad6395fccdf5f424a1dccab9b9/node_modules/@.../dist/chunks/test.B8ej_ZHS.js:239:23
 ❯ runTest node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab_@types+node_310e5dad6395fccdf5f424a1dccab9b9/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/index.js:1653:17

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Collaborator

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

my suggestions here could potentially be a longer-term solution to the unsupported parts of nuxt.

Copy link
Collaborator

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

great job! I didn't look too much into the stories themselves, but it looked good.

@sacrosanctic
Copy link
Contributor Author

great job! I didn't look too much into the stories themselves, but it looked good.

No worries, the stories will be iterative. I will be removing them so they can be discussed in their own PR.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Copy link
Collaborator

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

🏎️

Copy link
Contributor

@cylewaitforit cylewaitforit left a comment

Choose a reason for hiding this comment

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

Very much looking forward to this!

const meta = {
component: Component,
// component scope configuration goes here
} satisfies Meta<typeof Component>
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion(non-blocking): Could we use eslint-plugin-storybook's meta-satisfies-type rule to enforce this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can be done in a separate PR

},

experimental: {
entryImportMap: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Question(non-blocking): Were entryImportMap and typescriptPlugin removed intentionally?

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.

3 participants