Skip to content

Conversation

@sacrosanctic
Copy link
Contributor

@sacrosanctic sacrosanctic commented Feb 9, 2026

todo

  • setup storybook
  • setup chromatic
  • setup snapshots
  • review nuxt modules integration
  • how to define component boundaries
  • migrate vitest test to storybook?

stories

  • Input (most comprehensive, can be used as a template/example for to clone from)
  • LicenseDisplay
    • missing tests (consider migrating from existing vitest tests)
    • component should handle the nullish case internally
  • OG images
    • Package
      • doesnt work because its fetching from a relative api that doesnt exist in storybook context
  • DownloadAnalytics
    • all the stories seem to be except In modal
    • this seems to be multiple components in one

notes

  • stories are co-located with the component
  • story grouping mirrors file-system
  • feature notes on toolbar, jsdocs, global settings (ref)
  • nuxt module mocks

@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)
npmx.dev Ready Ready Preview, Comment Feb 10, 2026 3:56pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 10, 2026 3:56pm
npmx-lunaria Ignored Ignored Feb 10, 2026 3:56pm

Request Review

@codecov
Copy link

codecov bot commented Feb 9, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1551 1 1550 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.0101s run time
AssertionError: Missing a11y tests for 78 component(s):
  - AppFooter.vue
  - AppHeader.vue
  - AppLogo.vue
  - BaseCard.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
  - 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 78 to equal +0

- Expected
+ Received

- 0
+ 78

 ❯ test/unit/a11y-component-coverage.spec.ts:164: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.


- **Accessibility tests** - Built-in a11y checks (link to example)
- **Visual tests** - Compare JPG screenshots (link to example)
- **Snapshot tests** - Compare HTML output (link to example)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Based on years of user feedback, I'd strongly advice against HTML snapshot testing. It usually ends up being mindlessly updating the snapshots again and again, without any real use. Visual tests are much better snapshots, as they are easier to review and more granular because the diff is on the pixel level and contains styling too.

- An edge case per story
- Do not use `autodocs`

# How to Use
Copy link
Collaborator

Choose a reason for hiding this comment

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

this section reads to me like it's just a concise version of the Storybook docs, so I'm not sure it's valuable? The "Place a .stories.ts file next to your component" line is good, because you're establishing a convention. The import type { Meta, StoryObj } from '@nuxtjs/storybook' is also good because I would expect the LLM to trip up there a lot. but the rest might not be necessary?

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.

2 participants