Skip to content

WIP: fix Storybook#587

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

Open
wants to merge 3 commits into
base:master
Choose a base branch
from
Open

WIP: fix Storybook #587

wants to merge 3 commits into from

Conversation

ShMcK
Copy link
Member

Get Storybook working again.

Signed-off-by: shmck shawn.j.mckay@gmail.com

@ShMcKShMcK mentioned this pull request Mar 23, 2022
@SavvyShah
Copy link
Contributor

I can help you with this. We can have a talk.

ShMcK added 2 commits March 23, 2022 20:49
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
@ShMcK
Copy link
MemberAuthor

@SavvyShah I've sent you an email.

There are some remaining issues with the storybook setup:

  1. I have only enabled a single example story. Others can be added in .storybook/main.ts
  2. the addons in storybook 6 have changed (https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-addon-presets). with-knobs is deprecated but heavily used in the project
  3. 'babel-plugin-import' which is used to simplify a component library imports doesn't seem to work with webpack anymore (https://www.npmjs.com/package/babel-plugin-import). It's currently disabled.
  4. There are a number of TS errors in the stories.
@SavvyShah
Copy link
Contributor

Can we use a codemod to convert storiesOf to CSF?

@SavvyShahSavvyShah mentioned this pull request Sep 30, 2022
@SavvyShah
Copy link
Contributor

SavvyShah commented Sep 30, 2022

Hey @ShMcK . Sorry I have been slow in doing this. But I've made a couple of changes and configured an additional story.
I have linked a PR where I have made changes.
I found that mocking to the global API should be done in preview.ts.

// libraryName: '@alifd/next',
// style: true,
// },
// ])
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry some components may not work without @alifd/next and emotion support. But I may be wrong!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated my branch. I've also enabled the plugin. Seems to be working.

@ShMcK
Copy link
MemberAuthor

ShMcK commented Oct 2, 2022

Thanks @SavvyShah !
There seem to be some yarn.lock conflicts. These can likely be resolved by deleting the yarn.lock file and running yarn again.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
@ShMcK@SavvyShah
close