Skip to content
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

Migrate @storybook/addon-knobs to typescript #7180

Merged
merged 7 commits into from
Jul 8, 2019

Conversation

emilio-martinez
Copy link
Contributor

Issue: #5030

What I did

Migrate @storybook/addon-knobs to typescript.

**Note: ** To make this easier to review, I did an initial commit with a straight file rename from js => ts, and subsequent commits will add the types accordingly.

How to test

If all works correctly, functionally nothing should change to lib consumers beyond getting a typed package.

@emilio-martinez emilio-martinez self-assigned this Jun 25, 2019
@vercel
Copy link

vercel bot commented Jun 25, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-fork-emilio-martinez-ts-migration-addon-knobs.storybook.now.sh

@gaetanmaisse
Copy link
Member

@emilio-martinez to answer your question #5030 (comment), you can add @types/react-color in addon-knobs package, just run yarn add -D @types/react-color in storybook/addons/knobs folder

@emilio-martinez emilio-martinez force-pushed the ts-migration/addon-knobs branch from 9454545 to c536ba4 Compare June 25, 2019 07:58
@vercel vercel bot temporarily deployed to staging June 25, 2019 07:59 Inactive
@emilio-martinez emilio-martinez force-pushed the ts-migration/addon-knobs branch from c536ba4 to 2547cf1 Compare June 25, 2019 08:02
@emilio-martinez emilio-martinez force-pushed the ts-migration/addon-knobs branch from 2547cf1 to 8535624 Compare June 25, 2019 08:15
@emilio-martinez emilio-martinez force-pushed the ts-migration/addon-knobs branch from 35ddfa9 to fd2d168 Compare June 26, 2019 00:44
@emilio-martinez emilio-martinez force-pushed the ts-migration/addon-knobs branch from fd2d168 to b78f4c9 Compare June 26, 2019 07:59
@emilio-martinez emilio-martinez marked this pull request as ready for review June 26, 2019 08:14
@emilio-martinez emilio-martinez force-pushed the ts-migration/addon-knobs branch from b78f4c9 to 404060c Compare July 4, 2019 08:51
Copy link
Member

@gaetanmaisse gaetanmaisse left a comment

Choose a reason for hiding this comment

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

Great job @emilio-martinez ! Just a few comments you can simply resolve in a new commit 😉

addons/knobs/src/components/types/Color.tsx Outdated Show resolved Hide resolved
addons/knobs/src/components/types/Files.tsx Outdated Show resolved Hide resolved
addons/knobs/src/KnobManager.ts Outdated Show resolved Hide resolved
addons/knobs/src/KnobManager.ts Outdated Show resolved Hide resolved
addons/knobs/src/KnobManager.ts Show resolved Hide resolved
addons/knobs/src/components/Panel.tsx Outdated Show resolved Hide resolved
@emilio-martinez
Copy link
Contributor Author

@gaetanmaisse feedback addressed. FYI, I rebased to resolve a merge conflict.

DeepScan is calling out REACT_MISUSED_UPDATE_IN_SET_STATE, but I'd prefer to tackle in a separate PR once this is merged, if that's okay.

@shilman shilman merged commit 41602a0 into storybookjs:next Jul 8, 2019
@sami616
Copy link

sami616 commented Sep 17, 2019

Hi. I've just upgraded to SB 5.2 and my build is failing due to a TS error in addon-knobs. Something about react-color missing?

@shilman
Copy link
Member

shilman commented Sep 17, 2019

@sami616 Can you file an issue and include the details? We'll try to get you fixed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: knobs maintenance User-facing maintenance tasks typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants