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

chore: update storybook #471

Merged
merged 4 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const config: StorybookConfig & StorybookVitePlugins = {
},
},
},
'@chromatic-com/storybook',
gabyzif marked this conversation as resolved.
Show resolved Hide resolved
],

docs: {
autodocs: true,
defaultName: 'Documentation',
},

Expand All @@ -49,6 +49,10 @@ const config: StorybookConfig & StorybookVitePlugins = {
core: {
disableTelemetry: true, // requested by security
},

typescript: {
reactDocgen: 'react-docgen-typescript',
},
Comment on lines +51 to +54
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is that needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When doing the migration this was prompt:

Screenshot 2024-10-24 at 5 45 54 PM

So basically SB swiched to react-docgen but we had react-docgen-typescript on place and by doing this we are keeping it and not moving to react-docgen.

More info here

}

export default config
2 changes: 2 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const preview: Preview = {
},
},
},

tags: ['autodocs'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as the above

Copy link
Contributor Author

@gabyzif gabyzif Oct 24, 2024

Choose a reason for hiding this comment

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

This happened automatically when doing the upgrade. Before we we had the autodocs placed on main here:

Screenshot 2024-10-24 at 5 37 53 PM

When I was upgrading SB this showed up:

Screenshot 2024-10-24 at 5 24 24 PM

So basically it moved the config to the preview page.

more info here: migration docs

}

export default preview
Loading
Loading