-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Add deprecation warnings when addons are required via main package #1025
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.
|
@@ -1,2 +1,2 @@ | |||
import '@kadira/storybook/addons'; | |||
import '@kadira/storybook-addon-actions/register'; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
☁️ Nx Cloud ReportCI 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 targetSent with 💌 from NxCloud. |
Issue: #1017
What I did
Use
action
andlinkTo
addons 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.