Skip to content
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

Merge bento-design-system and storybook packages #660

Merged
merged 6 commits into from
Jul 17, 2023
Merged

Conversation

gabro
Copy link
Member

@gabro gabro commented Jul 6, 2023

This PR brings Storybook back into bento-design-system.

We currently use storybook as a separate package as a sort of smoke test for using @buildo/bento-design-system from a client perspective.

However, this has the major drawback of having an unconventional storybook setup which has these disadvantages:

  • tools like TurboSnap won't work (this is the main motivation for this PR, as it's costing us potentially thousands of euros a year in redundant snapshots)
  • we hit bugs like https://github.com/buildo/bento-design-system/blob/main/packages/storybook/stories/index.tsx#L14-L28, which cause some friction in our setup
  • the setup for working locally is a bit tricky (we need to configure turborepo to wait on a successful bento build before running the storybook)
  • iterating on a storybook is slower because it requires rebuilding the whole library before seeing a change in the storybook, and this takes ~10-20s on my machine.

For this reason, I think as of now the cons are much bigger than the pros, and we still achieve some of the props via some other smoke testing and/or tools like https://github.com/arethetypeswrong/arethetypeswrong.github.io

@gabro
Copy link
Member Author

gabro commented Jul 10, 2023

Future improvements once this is merged:

Copy link
Member

@veej veej left a comment

Choose a reason for hiding this comment

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

Just a small doubt, but LGTM 👍

@veej
Copy link
Member

veej commented Jul 10, 2023

Also, there's a story that is generating flaky chromatic diffs :(

@gabro gabro force-pushed the storybook-merge branch from 59835b3 to 8a4f50b Compare July 17, 2023 16:08
gabro added 5 commits July 17, 2023 18:09
@babel/preset-env (required by strorybook) conflicted with
@vanilla-extract/integration (used by @vanilla-extract/vite-plugin)
which would make vitest fail.
@gabro gabro force-pushed the storybook-merge branch from 8a4f50b to 91993fa Compare July 17, 2023 16:12
@gabro gabro added the chore label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants