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

Addon-knobs: Move @types/react-color to devDeps #11690

Merged
merged 2 commits into from
Jul 26, 2020
Merged

Addon-knobs: Move @types/react-color to devDeps #11690

merged 2 commits into from
Jul 26, 2020

Conversation

gaetanmaisse
Copy link
Member

@gaetanmaisse gaetanmaisse commented Jul 25, 2020

Issue: #11315

What I did

See #11315 (comment)

TLDR;

It looks like some function of components from addon-knob (handleChange and handleClick) should be private functions as they are used to handle internal stuff. Making then private leads to a generated Color.d.ts that doesn't import things from @types/react-color anymore so we can move this dependency from regular dep to devDep 🎉 .

How to test

…iles

All theses functions shouldn't be used outside the class, making them private simplify the types generated in type definition files (`.d.ts`).
This enable us to move some deps to devDeps if they are not used (imported) in generated definition files.
No definition file is using it anymore so we can move this regular dep to devDeps.
@gaetanmaisse gaetanmaisse added addon: knobs maintenance User-facing maintenance tasks labels Jul 25, 2020
@gaetanmaisse gaetanmaisse marked this pull request as ready for review July 25, 2020 18:25
@shilman shilman changed the title Knobs: change visibility of some methods to move @typesreact-color to devDeps Knobs: change visibility of some methods to move @types/react-color to devDeps Jul 26, 2020
@shilman shilman changed the title Knobs: change visibility of some methods to move @types/react-color to devDeps Addon-knobs: Move @types/react-color to devDeps Jul 26, 2020
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM! Do we need to do something similar for Controls? It uses similar patterns @gaetanmaisse

@stof stof deleted the fix-11315 branch May 25, 2022 09:31
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The @storybook/addon-knobs addon package, contains @types/react-color as a dependency.
2 participants