-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Tooling: Add Storybook for client/*
#75167
Comments
Noting that this would replace https://wpcalypso.wordpress.com/devdocs/design In addition to
cc @Automattic/team-calypso who should probably own something like this. |
I think we should add storybook to the top level of the repo, and then add everything under it (including the existing storybook examples in packages, and anything we want to add from the client). Step one would probably be to get the existing packages into it Devdocs migration is definitely promising (for having one less thing to maintain), but I could see it being tough to prioritize in the near term for our team |
Thanks for opening the discussion up, this is a neat idea! 💯 We've already been using Storybook in many places in Calypso and Gutenberg, so I'd love to see unification in that area. I agree that a single top-level storybook that encompasses the entire repo would be best. As Noah said, we could start with the existing storybook instances and gradually migrate everything away from the existing devdocs. It doesn't have to be one big step, but rather many incremental ones. This isn't something our team prioritizes (meaning, actively works on) right now, but we're happy to help with reviews, guidance, and discussion, and any other help needed. |
cc @javierarce if you have any opinions about how Storybook for Calypso might work |
Besides what others have mentioned on this thread and from a designer perspective, it would be great to enable the Figma integration and the Accessibility addon. And I wonder if it would make sense to use Storybook Composition to integrate other storybooks like Gutenberg or Jetpack. |
@okmttdhr Might be worth blogging about this on calypsop2 too? |
I'd say migrating |
Migrating to Storybook 7 would be awesome if anyone has time for it -- it more explicitly supports React 18, which would be nice to have for #77046. I temporarily bumped the packages in #77121, but I think the changes required to support it are a little more broad to do simultaneously. We have some workarounds in our storybook configs we can probably remove now too. I'll probably get to it eventually, but it'll take some time! :) |
Actually, it was a lot easier than I expected! I added a few options which make the initial boot faster, though it seems to load modules on demand. Storybook 7 is working pretty well in #77121, with only a couple tweaks needed. |
@noahtallen I don't think this was closed on purpose, so reopening. |
Indeed, I think GitHub must have auto-closed it. |
Overview
Currently, we have some Storybooks under the
packages
directory (e.g., tour-kit, components), but no Storybook for under theclient
directory.I would suggest that we can have Storybook under the
client
directory. This way, we can add a "story" for every piece of UI (for components/pages/etc).Context
Without Storybook, we need to run a local server when developing UI-related things, which is slow to debug and not easy to test all the conditions.
I would be happy to be able to develop based on Storybook at a larger granularity (e.g., per page) without limiting Storybook to so-called "components" only. https://storybook.js.org/docs/react/get-started/why-storybook#build-uis-in-isolation
There are several advantages to using Storybook for UI development.
Tasks
Some tasks may be better isolated as another task.
Related Resources
The text was updated successfully, but these errors were encountered: