Skip to content

feat: add storybook#1270

Merged
danielroe merged 42 commits intonpmx-dev:mainfrom
sacrosanctic:storybook
Feb 26, 2026
Merged

feat: add storybook#1270
danielroe merged 42 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 26, 2026 5:46pm
npmx.dev Ready Ready Preview, Comment Feb 26, 2026 5:46pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Feb 26, 2026 5:46pm

Request Review

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

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.

optionalDependencies:
'@vitest/browser': 4.0.18(@voidzero-dev/vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab(@opentelemetry/api@1.9.0)(@types/node@24.10.13)(esbuild@0.27.3)(happy-dom@20.4.0)(jiti@2.6.1)(terser@5.46.0)(typescript@5.9.3)(yaml@2.8.2))(vite@7.3.1(@types/node@24.10.13)(jiti@2.6.1)(lightningcss@1.31.1)(terser@5.46.0)(yaml@2.8.2))

'@vitest/expect@3.2.4':
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the provenance check doesn't like introducing these lower version @vitest/ dependencies. Do these need an override to a higher version that's already in the repo or is there some other way to better satisfy the check?

sharp: 0.34.5
vite: npm:@voidzero-dev/vite-plus-core@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab
vitest: npm:@voidzero-dev/vite-plus-test@0.0.0-833c515fa25cef20905a7f9affb156dfa6f151ab
storybook: ^10.2.7
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

This looks like it would solve the provenance issue.

Suggested change
storybook: ^10.2.7
storybook: ^10.2.7
'@storybook/csf-plugin': ^10.2.7
storybook@^10.2.7>@vitest/expect: ^4.0.18
storybook@^10.2.7>@vitest/spy: ^4.0.18
'@storybook/vue3-vite@9.1.2>vue-component-meta': ^3.2.4

I tested it in #1651

The storybook dev server still seems to start up and render the stories just fine.

@danielroe danielroe self-assigned this Feb 26, 2026
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

📚 ❤️

@danielroe danielroe added this pull request to the merge queue Feb 26, 2026
Merged via the queue into npmx-dev:main with commit aa62d11 Feb 26, 2026
18 of 19 checks passed
@tobiasdiez
Copy link

I’m one of the maintainers of the Nuxt/Storybook module and addon. I’ve been looking through the setup and noticed a few hacks and workarounds that seem to be covering some of the rough edges between Storybook and Nuxt.
I was curious whether those issues have already been reported over at https://github.com/nuxt-modules/storybook, and if not, whether there’s anything we could do together to make the integration a bit smoother.

Also wanted to ask if you’d be open to adding stories in the Vue format using https://github.com/tobiasdiez/storybook-vue-addon. It still has a few known issues, but seeing an open and active project like npmx use it would be a big motivation for me to spend time fixing those and would provide real-world uses cases to guide some of the design decisions.

@yannbf
Copy link
Contributor

yannbf commented Feb 26, 2026

I’m one of the maintainers of the Nuxt/Storybook module and addon. I’ve been looking through the setup and noticed a few hacks and workarounds that seem to be covering some of the rough edges between Storybook and Nuxt. I was curious whether those issues have already been reported over at nuxt-modules/storybook, and if not, whether there’s anything we could do together to make the integration a bit smoother.

Also wanted to ask if you’d be open to adding stories in the Vue format using tobiasdiez/storybook-vue-addon. It still has a few known issues, but seeing an open and active project like npmx use it would be a big motivation for me to spend time fixing those and would provide real-world uses cases to guide some of the design decisions.

Hey Tobias! I noticed a few rough edges and was planning on reaching out. Let's chat on discord, I think there's a great opportunity here to make the nuxt integration as amazing as it can be!

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.

6 participants