-
Notifications
You must be signed in to change notification settings - Fork 896
chore(site): upgrade storybook to v8 #12831
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
Changes from all commits
b067c89
801e900
5ee50bf
1f9c3e1
2f5d356
3880eea
4463294
cf0cb64
085de56
d19519d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import { | |
} from "@mui/material/styles"; | ||
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react"; | ||
import { DecoratorHelpers } from "@storybook/addon-themes"; | ||
import { withRouter } from "storybook-addon-react-router-v6"; | ||
import { withRouter } from "storybook-addon-remix-react-router"; | ||
import { QueryClient, QueryClientProvider } from "react-query"; | ||
import { HelmetProvider } from "react-helmet-async"; | ||
import themes from "theme"; | ||
|
@@ -14,6 +14,15 @@ import "theme/globalFonts"; | |
DecoratorHelpers.initializeThemeState(Object.keys(themes), "dark"); | ||
|
||
export const decorators = [ | ||
withRouter, | ||
withQuery, | ||
(Story) => { | ||
return ( | ||
<HelmetProvider> | ||
<Story /> | ||
</HelmetProvider> | ||
); | ||
}, | ||
Comment on lines
+17
to
+25
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. Does changing the decorators affect anything here? I would assume this wouldn't break anything, but I'm not sure if there's anything else I'm missing 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. Idk why, to be honest, but I had to make the theme provider the last decorator to make it work. |
||
(Story, context) => { | ||
const selectedTheme = DecoratorHelpers.pluckThemeFromContext(context); | ||
const { themeOverride } = DecoratorHelpers.useThemeParameters(); | ||
|
@@ -30,15 +39,6 @@ export const decorators = [ | |
</StyledEngineProvider> | ||
); | ||
}, | ||
withRouter, | ||
(Story) => { | ||
return ( | ||
<HelmetProvider> | ||
<Story /> | ||
</HelmetProvider> | ||
); | ||
}, | ||
withQuery, | ||
]; | ||
|
||
export const parameters = { | ||
|
@@ -49,9 +49,6 @@ export const parameters = { | |
locales: "en-US", | ||
}, | ||
}, | ||
actions: { | ||
argTypesRegex: "^(on|handler)[A-Z].*", | ||
}, | ||
Comment on lines
-52
to
-54
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. I was reading up on this, and I think I get how it works 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. I guess so but it is not necessary anymore. |
||
controls: { | ||
expanded: true, | ||
matchers: { | ||
|
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 get why we're starting this off as
false
, but this looks like it could be a cool feature to flip on at some pointThere 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.
Maybe?! I see this as helpful for component libraries but not for internal component usage.