-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Storybook support and Typography #11
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Xavier Geerinck <[email protected]>
Someone is attempting to deploy a commit to a Personal Account owned by @shadcn on Vercel. @shadcn first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@shadcn anything that should change for this to get approved? |
@XavierGeerinck I'll check it out. I've only used Storybook on one or two projects so wondering how much maintenance work this is going to require moving forward. |
Perfect! Looking forward to it :) Regarding to the maintenance, I think it in the end is always going to be minimal seeing that it just requires a story file to be included for the different components which is the documentation of the component itself. Personally, I would even argue that Storybook could become main for this project as its community adopted in the way how large organization manage and document their components. The documentation must be created anyways, and storybook standardized that (and offers test suites in more advanced functionality as well) As an example, including the Microsoft: https://master--628d031b55e942004ac95df1.chromatic.com/ and Shopify: https://main--5d559397bae39100201eedc1.chromatic.com/ components |
It would be cool to add the addon: @storybook/addon-a11y |
Maybe https://github.com/tajo/ladle instead? |
To be honest, I didn't understand why you offered ladle, but then I saw that a11y has the name https://github.com/storybookjs/storybook/blob/main/addons/a11y/docs/screenshot.png |
Hi everyone. Thanks for your work on this. This is looking good. I'm open to merging it. However we might need help with maintenance going forward. Anyone here willing to help (from time to time) on Storybook-related issues? |
I can help with it, as I want to also update the version of storybook here, and I have to maintain it on other codebases too |
Ah cool I'm glad I stopped and checked, as I was in the middle of generating these myself. Would love to get this merged 🙏 Upkeep should be fairly minimal |
I hope it can be merged as soon as possible, looking forward to it. |
I would be open to helping with storybook as well. I used it in a couple of projects. Really great choice of adding this. |
apps/www/package.json
Outdated
@@ -70,11 +93,13 @@ | |||
"remark-code-import": "^1.1.1", | |||
"remark-gfm": "^3.0.1", | |||
"shiki": "^0.12.1", | |||
"tailwindcss": "^3.1.7", | |||
"typescript": "^4.5.3", | |||
"storybook": "^7.0.0-beta.33", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"storybook": "^7.0.0-beta.33", | |
"storybook": "^7.0.4", |
storybook v.7 is now out of beta. https://storybook.js.org/blog/storybook-7-0/
i would love this merge, im trying to do this integration between storybook and shadcn from scratch right now, please @shadcn 🙏 |
I also approve of the Storybook support. However, the code in this PR is now deprecated. Storybook has deprecated defining stories in MDX files |
Just wanted to say I came here hoping to use these for our own storybook. |
@shadcn 👋🏽 I'm part of the Storybook DX team. Happy to help out with any Storybook related issues. |
@XavierGeerinck if you're okay, I'm happy to upgrade to 7.0, convert stories into tsx and enable autodocs |
I think the easiest way would be to just copy and paste the stories you need from the Files Change in the PR here and change the |
feat(storybook): ✨ added storybook files to registry and CLI
docs: fix readme
import type { StorybookConfig } from "@storybook/nextjs" | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)"], | |
stories: ["../stories/**/*.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx)", "../registry/stories/**/*.stories.@(js|jsx|ts|tsx)"], |
I had to add this to get the components to show up in the storybook.
Another +1 from me. Storybook would allow me to programmatically sync our design system to Figma. |
Hey friends 👋 @XavierGeerinck @shadcn Just your friendly neighbourhood Storybook maintainer here looking to see if there's anything I can do to lend a hand on this effort 🧑🔧 |
@integrayshaun I'm pretty sure, at this point, that you can fork this branch and create a PR for |
I would love some more movement on this or just remake it and hope it gets noticed again... i guess being #11 out of 1379 PR's has some visibility issues. I've also created several more stories for the missing components in other projects recently so if things start moving then i can add those to this or the new PR ❤️ |
I'm more than happy to put together a new up-to-date PR based on the great work done here but I don't want to go over @XavierGeerinck if they still want to finish this PR up :) |
Just wanted to note that I'm very, VERY much looking forward to this, as we are integrating this with a modern workflow for the updated version of our product.
Only one piece of the puzzle missing... Can't wait! |
👍 looking forward to this too, my case is similar to @csartor
|
i too will find great joy if i can opt in to auto-creating stories with the cli |
I've forked this PR and removed the typography component to try and better scope the PR and get shadcn's attention and momentum into seeing whats needed to get this implemented. I'll try play a more active role in maintaining and adding any additional commits from others 🤞 |
You rock!! |
I have been using shadcn-ui quite intensively lately and just wanted to offer free lost-pixel.com visual regression testing runs on our platform if this gets merged. So, answering the question about maintenance, I would be happy to help with the maintenance of storybook issues & and visual regression tests(that would come for free with the storybook) maintenance as well. Excited about this PR 🙌🏼 |
subtitle="Default background color of <body />...etc" | ||
colors={{ | ||
background: "hsl(var(--background))", | ||
oreground: "hsl(var(--foreground))", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I updated this in the color.stories.mdx for the #1561 👍
Any updates here if this will be merged soon? |
The forked version of this (#1561) has been added to the roadmap under the next milestone so Im hoping to hear an update soon 🥳 |
subtitle="Default background color of <body />...etc" | ||
colors={{ | ||
background: "hsl(var(--background))", | ||
oreground: "hsl(var(--foreground))", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a typo here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I updated this in the color.stories.mdx for the #1561 👍
🙏
Hello there, Is there any plan to merge this cool feature? |
Will this be merged anytime soon? :) |
Any update on this? |
Hey, @sudarshan-mane |
@XavierGeerinck Storybook controls are not being auto generated in this PR, can you please look into it ? |
@sohamnandi77 look at #1561 instead |
Changes made - update main and sidebar layouts - solve overflow issues in mobile sidebar menu - extract repetitive codes into a reusable component - hide unnecessary overflow
Overview
This PR introduces the following:
Storybook Support
Introduction
Storybook is a frontend workshop for building UI components and pages in isolation. Used by large corporations around the world such as Microsoft, Shopify, AirBnB, Monday and many more.
It provides the following advantages:
Why Storybook
Beside the advantages listed before, the reason I am submitting Storybook is because it allows visibility to be improved as well. As an amazing repository, this can be published on the Storybook websites for others to discover and use.
Preview
Typography Abstraction
To adhere to corporate theming, common HTML elements are often override. Since this repository provides a starting point for Typography, I decided to integrate Typography as an abstraction. Users can simply utilize the capitalized elements and add their own classes or stylings as they would do so otherwise.
Example:
Note
This PR also added a shameless "Thank You" message for contributing back. Open for opinions on this one.
Checklist
GitHub
Signed-off-by: Xavier Geerinck [email protected]