-
Notifications
You must be signed in to change notification settings - Fork 19
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
Support Storybook 7.0.0 #48
Conversation
@@ -1,8 +1,9 @@ | |||
/* eslint no-underscore-dangle: 0 */ | |||
|
|||
import { navigator } from 'global'; | |||
// navigator exists in Jest but not the browser. global exists in the browser but not Jest |
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 really confused me. If anyone knows the reason for this, please enlighten me!
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.
Thanks for this @literalpie, and sorry for the radio silence! 😔
The code changes looks good. I haven't tried it out, but I trust you if you say it works.
Do you know if it makes sense to include #45 too, or is that irrelevant for 7.0?
Could you change the Storybook dependencies from "7.0.0-rc.1"
to just "7.0.0"
, then I'll merge and release this! 🚀
Updating to SB 7.0
I found the issue in a third party library and a workaround! is PR #45 still relevantIn 6.5, that PR seems to be a valid fix for an issue that I've been noticing. Unfortunately, in SB 7.0, the change from that PR causes things to break. I'll see if I can look into a different fix, but that should probably be a separate PR. More testingI did test this in a large, private storybook with many knobs and I didn't see any issues. |
I tested #45 again and it is working! I'm pretty sure I put the change in the wrong place last time I tested it 🤦🏼 |
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/api": "7.0.0", | ||
"@storybook/components": "7.0.0", | ||
"@storybook/core-events": "7.0.0", | ||
"@storybook/theming": "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.
Hard pinning these to "7.0.0" breaks peer dependencies for any project that upgrades to any patch releases like the current 7.0.7. Shouldn't these be caret pinned instead to "^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.
I opened this PR. Thanks for the heads up! I missed this
Fixes #47
I figured it was worth a shot to see if this can be done easily, and I think I did it. I've just tested it using the examples in this repo.
Hopefully this will make it easier for some slow-moving orgs to move to SB7.
I also updated most of the dependencies