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

Upgrade to Storybook 6 #535

Merged
merged 1 commit into from
Aug 11, 2020
Merged

Upgrade to Storybook 6 #535

merged 1 commit into from
Aug 11, 2020

Conversation

marcelgerber
Copy link
Member

This upgrades our storybook version to 6.0, which is currently a release candidate but is scheduled to come out... tomorrow (storybookjs/storybook#9311)!

This gives us out-of-the-box TS support and a nicer way to configure things.

I've also enabled some more addons using the new @storybook/essentials package:

  • addon-docs auto-generates the props of our components
  • addon-actions was enabled before
  • addon-controls lets us control the props of the component to play around with it
  • addon-viewport lets us view a component in different viewports

@@ -31,7 +31,7 @@
"serve": "yarn tsn admin/server/server.tsx",
"bake": "yarn tsn scripts/bakeSite.ts",
"deploy-queue": "yarn tsn deploy/watch.ts",
"storybook": "yarn tsn node_modules/.bin/start-storybook -p 6006",
"storybook": "start-storybook -p 6006",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this means the new Storybook respects tsconfig settings. Neat!

@@ -100,7 +100,8 @@ class ChartStoryView extends React.Component {
}

export default {
title: "ChartView"
title: "ChartView",
component: ChartView
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this new component property?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is used to auto-generate documentation for the props: https://github.com/storybookjs/storybook/blob/next/addons/docs/react/README.md#props-tables

Looks like this:
image

also enable some new addons
@marcelgerber marcelgerber changed the title Upgrade to Storybook 6 (RC) Upgrade to Storybook 6 Aug 11, 2020
@marcelgerber
Copy link
Member Author

Just updated to the just-released storybook 6.0.0.
Merging this now.

@marcelgerber marcelgerber merged commit 416df60 into master Aug 11, 2020
@marcelgerber marcelgerber deleted the storybook-6 branch August 11, 2020 07:44
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