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

Add deprecation warnings when addons are required via main package #1025

Merged
merged 3 commits into from
May 13, 2017

Conversation

shilman
Copy link
Member

@shilman shilman commented May 12, 2017

Issue: #1017

What I did

Use action and linkTo addons just like any other storybook addon.
Update examples, docs, and add deprecation warning to code.

How to test

First run:

npm run bootstrap
cd examples/cra-storybook
npm run storybook

Open browser console, and there should be no deprecation warnings.
Then, update the stories to use:

import { storiesOf, action, linkTo from } from '@kadira/storybook'

Deprecation warnings should appear in the browser console.

Use `action` and `linkTo` addons just like any other storybook addon.
Update examples, docs, and add deprecation warning to code.
@codecov
Copy link

codecov bot commented May 12, 2017

Codecov Report

Merging #1025 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1025      +/-   ##
==========================================
- Coverage   12.56%   12.51%   -0.05%     
==========================================
  Files         196      196              
  Lines        4442     4458      +16     
  Branches      711      713       +2     
==========================================
  Hits          558      558              
- Misses       3255     3269      +14     
- Partials      629      631       +2
Impacted Files Coverage Δ
packages/react-storybook/src/server/addons.js 0% <0%> (ø) ⬆️
packages/react-native-storybook/src/index.js 0% <0%> (ø) ⬆️
...ckages/react-native-storybook/src/server/addons.js 0% <0%> (ø) ⬆️
...ts/stories/required_with_context/Button.stories.js 0% <0%> (ø) ⬆️
packages/react-storybook/demo/src/stories/index.js 0% <0%> (ø) ⬆️
packages/addon-info/example/story.js 0% <0%> (ø) ⬆️
packages/react-storybook/src/client/index.js 0% <0%> (ø) ⬆️
...s/stories/required_with_context/Welcome.stories.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18e37f2...3265351. Read the comment docs.

@tmeasday tmeasday self-assigned this May 12, 2017
@@ -1,2 +1,2 @@
import '@kadira/storybook/addons';
import '@kadira/storybook-addon-actions/register';
Copy link
Member

Choose a reason for hiding this comment

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

Is this missing addon-links?
Or is this on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

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

on purpose. links are not used in this example.

import { linkTo as _linkTo } from '@kadira/storybook-addon-links';

export const action = deprecate(
_action,
Copy link
Member

Choose a reason for hiding this comment

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

This dangling underscore will become an eslint error in the future, can you pick another naming pattern?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed!

@shilman shilman merged commit 42219f5 into storybookjs:master May 13, 2017
@shilman shilman added the misc label May 27, 2017
@ndelangen ndelangen changed the title Deprecate built-in addons Add deprecation warnings when addons are required via main package May 27, 2017
@ndelangen ndelangen added the maintenance User-facing maintenance tasks label May 27, 2017
Copy link

nx-cloud bot commented Oct 10, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 3265351. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

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

Successfully merging this pull request may close these issues.

3 participants