coderoad / coderoad-vscode

👩‍💻 Create or play Interactive coding tutorials in VSCode
https://coderoad.github.io
GNU Affero General Public License v3.0
949 stars 39 forks source link

WIP: fix Storybook #587

Open ShMcK opened 2 years ago

ShMcK commented 2 years ago

Get Storybook working again.

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

SavvyShah commented 2 years ago

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

ShMcK commented 2 years ago

@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 commented 2 years ago

Can we use a codemod to convert storiesOf to CSF?

SavvyShah commented 2 years ago

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.

ShMcK commented 2 years ago

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.