-
Notifications
You must be signed in to change notification settings - Fork 1
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(Storybook): migrate to version 6 #801
Conversation
Previous attempt: #679 |
4a131cb
to
b00ce2d
Compare
.storybook/main.js
Outdated
const { getRules } = require('../scripts/build/webpack.config'); | ||
|
||
module.exports = { | ||
stories: ['../stories/**/*.@(js|jsx|ts|tsx)'], |
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.
In the old version loading files was implemented via index.ts
and we had a right overriding because stories were ordered in the right way in the index.ts
. In the current implementation we still can control order by items in the array stories
, but first we need to group our stories into subgroups/subfolders Concepts
, Theme
, Atoms
etc (in the same way as we have for preview.js), for example:
stories: ['../stories/theme/*.@(js|jsx|ts|tsx)', '../stories/**/*.@(js|jsx|ts|tsx)'],
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'm sure I tried this before, and it didn't work. But you are right, and it does work. Nice one!!!
I'll push a commit with this.
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.
done
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.
We still have a problem with overriding styles for Pagination
, because these styles come from Themeroller
that comes after Pagination
, we need to put it before the high-level components:
stories: [
'../stories/theme/*.@(js|jsx|ts|tsx)',
'../stories/atoms/*.@(js|jsx|ts|tsx)',
'../stories/molecules/*.@(js|jsx|ts|tsx)',
'../stories/organisms/*.@(js|jsx|ts|tsx)',
'../stories/packages/*.@(js|jsx|ts|tsx)',
'../stories/**/*.@(js|jsx|ts|tsx)',
],
After resolving this feel free to move the task forward
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'm actually not convinced that the theme should be at the beginning. Its whole purpose is to overwrite the styles, and then storybook will showcase the components as they will look like if adding that theme to the application. What do you think?
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.
done
fe3f148
to
924bc49
Compare
Pending issues after the upgrade:
.mdx
file, but was not loaded to the UI.