-
Notifications
You must be signed in to change notification settings - Fork 4.6k
🪟 🔧 Upgrade to Storybook 7 #22056
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
Merged
Merged
🪟 🔧 Upgrade to Storybook 7 #22056
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
674c8e8
WIP Upgrade to Storybook 7
bada25d
Fix outstanding issues
6ab502b
Empty NL
64dcc08
Increase node memory limit
a757988
Merge branch 'master' into tim/storybook7
48a460f
Move heap size flag to gradle
f7cd992
Remove depth from checkout
7836952
Fix chromatic action
6915ffa
Merge branch 'master' into tim/storybook7
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
|
||
const config: StorybookConfig = { | ||
framework: "@storybook/react-vite", | ||
stories: ["../src/**/*.stories.@(ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
], | ||
}; | ||
|
||
export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import { addDecorator } from "@storybook/react"; | ||
|
||
import { withProviders } from "./withProvider"; | ||
|
||
import "!style-loader!css-loader!sass-loader!../public/index.css"; | ||
import "../public/index.css"; | ||
import "../src/scss/global.scss"; | ||
import "../src/globals"; | ||
|
||
addDecorator(withProviders); | ||
import "../src/dayjs-setup"; | ||
|
||
export const parameters = {}; | ||
export const decorators = [withProviders]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,11 @@ import { QueryClientProvider, QueryClient } from "react-query"; | |
import { theme } from "../src/theme"; | ||
import messages from "../src/locales/en.json"; | ||
import { FeatureService } from "../src/hooks/services/Feature"; | ||
import { ConfigServiceProvider, defaultConfig } from "../src/config"; | ||
import { ConfigServiceProvider, config } from "../src/config"; | ||
import { DocumentationPanelProvider } from "../src/views/Connector/ConnectorDocumentationLayout/DocumentationPanelContext"; | ||
import { ServicesProvider } from "../src/core/servicesProvider"; | ||
import { analyticsServiceContext } from "../src/hooks/services/Analytics"; | ||
import { AppMonitoringServiceProvider } from "../src/hooks/services/AppMonitoringService"; | ||
import type { AnalyticsService } from "../src/core/analytics"; | ||
|
||
const analyticsContextMock: AnalyticsService = { | ||
|
@@ -38,11 +39,13 @@ export const withProviders = (getStory) => ( | |
<MemoryRouter> | ||
<IntlProvider messages={messages} locale={"en"}> | ||
<ThemeProvider theme={theme}> | ||
<ConfigServiceProvider defaultConfig={defaultConfig} providers={[]}> | ||
<ConfigServiceProvider config={config}> | ||
<DocumentationPanelProvider> | ||
<FeatureService features={[]}> | ||
{getStory()} | ||
</FeatureService> | ||
<AppMonitoringServiceProvider> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ This broke the |
||
<FeatureService features={[]}> | ||
{getStory()} | ||
</FeatureService> | ||
</AppMonitoringServiceProvider> | ||
</DocumentationPanelProvider> | ||
</ConfigServiceProvider> | ||
</ThemeProvider> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is kinda "funny" that this worked beforehand. So it seems that Storybook never did typecheck those files, until Storybook 7 (or use using a
main.ts
instead ofmain.js
).