Add deprecation warnings when addons are required via main package#1025
Merged
shilman merged 3 commits intostorybookjs:masterfrom May 13, 2017
Merged
Add deprecation warnings when addons are required via main package#1025shilman merged 3 commits intostorybookjs:masterfrom
shilman merged 3 commits intostorybookjs:masterfrom
Conversation
Use `action` and `linkTo` addons just like any other storybook addon. Update examples, docs, and add deprecation warning to code.
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
ndelangen
requested changes
May 12, 2017
| @@ -1,2 +1,2 @@ | |||
| import '@kadira/storybook/addons'; | |||
| import '@kadira/storybook-addon-actions/register'; | |||
Member
There was a problem hiding this comment.
Is this missing addon-links?
Or is this on purpose?
Member
Author
There was a problem hiding this comment.
on purpose. links are not used in this example.
| import { linkTo as _linkTo } from '@kadira/storybook-addon-links'; | ||
|
|
||
| export const action = deprecate( | ||
| _action, |
Member
There was a problem hiding this comment.
This dangling underscore will become an eslint error in the future, can you pick another naming pattern?
ndelangen
approved these changes
May 13, 2017
|
View your CI Pipeline Execution ↗ for commit 3265351
☁️ Nx Cloud last updated this comment at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #1017
What I did
Use
actionandlinkToaddons just like any other storybook addon.Update examples, docs, and add deprecation warning to code.
How to test
First run:
Open browser console, and there should be no deprecation warnings.
Then, update the stories to use:
Deprecation warnings should appear in the browser console.