Skip to content

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

Merged
shilman merged 3 commits intostorybookjs:masterfrom
shilman:1117-deprecate-builtin-addons
May 13, 2017
Merged

Add deprecation warnings when addons are required via main package#1025
shilman merged 3 commits intostorybookjs:masterfrom
shilman:1117-deprecate-builtin-addons

Conversation

@shilman
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Oct 10, 2024

View your CI Pipeline Execution ↗ for commit 3265351

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 16s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-21 20:43:34 UTC

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