-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Storybook v7 #154
Storybook v7 #154
Conversation
fooloomanzoo
commented
Dec 24, 2022
•
edited
edited
- update dependencies
- adjust to new addons setup configuration
- adjust run scripts for new storybook-cli
- add @storybook/blocks dependency
- import controls from new location (@storybook/blocks)
- apply styles for auto dark mode mode in preview
- responsive flex box style fixes for controls
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
649c013
to
dbb3f48
Compare
@fooloomanzoo, thanks for your contribution. Can you please specify if there are any breaking changes and if it's backward compatible? |
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.
@nutboltu
Additionally to the changes regarding the different locations and export declarations in storybook v7, there are some issues fixed in styling, so the controls better adjust to panel position changes and take over the provided theming by storybook. Storybook also changed something about the peer dependencies, what could be the reason for the integration tests failing (not sure).
also: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#addon-authors
@@ -8,5 +8,5 @@ function managerEntries(entry = []) { | |||
|
|||
module.exports = { | |||
managerEntries, | |||
config, | |||
previewAnnotations, |
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.
This would be a breaking change for older storybook version, since the entry has or will change
RangeControl, | ||
TabsState, | ||
} from '@storybook/components'; | ||
import { ObjectControl, RangeControl } from '@storybook/blocks'; |
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.
The components for the controls distributed by storybook have been restructured also.
border: ${({ theme }) => theme.input.border}; | ||
background: ${({ theme }) => theme.input.background}; | ||
border-radius: ${({ theme }) => theme.input.borderRadius}; |
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.
Color-theme-style changes are necessary since auto dark mode is also now integrated by storybook v7
@@ -1,5 +1,5 @@ | |||
import { FORCE_RE_RENDER, STORY_CHANGED } from '@storybook/core-events'; | |||
import addons from '@storybook/addons'; | |||
import { addons } from '@storybook/addons'; |
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.
Also changed, addons is not the default export of storybook-addon anymore
@nutboltu |
dbb3f48
to
caef7cb
Compare
caef7cb
to
98d76a8
Compare
98d76a8
to
71628d8
Compare
71628d8
to
31f354f
Compare
31f354f
to
84e7d38
Compare
84e7d38
to
c6ea8ac
Compare
- update dependencies - adjust to new addons setup configuration - adjust run scripts for new storybook-cli - add @storybook/blocks dependency - import controls from new location (@storybook/blocks) - apply styles for auto dark mode mode in preview - responsive flex box style fixes
c6ea8ac
to
420aa99
Compare
@nutboltu @fooloomanzoo thanks for taking a stab on this |
hi @nutboltu, thank you for your work on this addon. thanks in advance for your help |
hello everyone! I'm sorry for not being active in this project for a while. Due to my current workload, I couldn't spend time on this PR. I may have some time in early April to make it a stable release. However, I am considering if there's a way to give this project an alpha release. |
@fooloomanzoo this project supports node 16. The build is failing due to some missing packages. Can you please take a look into these fixes? I want to release an alpha version with your changes to unblock others. |
@nutboltu added the release candidate version. there is not yet a 7.0.0 storybook release. this was the reason |
Hi @fooloomanzoo and @nutboltu, I just wanted to drop in and let you know that, Storybook v7.0.0 is out. It's only on the If you hit any issues with v7, we've written a migration guide for addon authors here and here. You're also free to reach out to us in the #prerelease channel on our Discord Server and we'll happily help you out! cc @ndelangen |
@@ -1,5 +1,5 @@ | |||
import { FORCE_RE_RENDER, STORY_CHANGED } from '@storybook/core-events'; | |||
import addons from '@storybook/addons'; | |||
import { addons } from '@storybook/addons'; |
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.
import { addons } from '@storybook/addons'; | |
import { addons } from '@storybook/preview-api'; |
"@storybook/api": "^6.4.0", | ||
"@storybook/components": "^6.4.0", | ||
"@storybook/theming": "^6.4.0", | ||
"@storybook/addons": "^7.0.0", |
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/addons": "^7.0.0", | |
"@storybook/preview-api": "^7.0.0", |
@fooloomanzoo, thanks for the awesome contribution. However, the build is failing, and to accelerate the feature (storybook v7 support), I will merge the PR and fix the builds. |