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

Remove deprecated import style for storybook/addon-docs #34095

Merged
merged 1 commit into from Aug 23, 2021

Conversation

@gravityrail
Copy link
Contributor

@gravityrail gravityrail commented Aug 16, 2021

Description

Fixes the warning Importing from '@storybook/addon-docs/blocks' is deprecated, import directly from '@storybook/addon-docs' instead: when loading the storybook in the browser.

Also removes two redundant addDecorator calls from preview.js, one of which was throwing a warning about a duplicate decorator.

How has this been tested?

Running the storybook and confirming that there is no warning about the deprecated import.

npm run storybook:dev
npm run storybook:build
open storybook/build/index.html

Screenshots

The warnings being fixed:

storybook-js-errors

Types of changes

Small cleanups in the storybook code.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
gziolo
gziolo approved these changes Aug 23, 2021
Copy link
Member

@gziolo gziolo left a comment

Thank you for the fix 👍🏻

@gziolo gziolo merged commit 9e3be44 into trunk Aug 23, 2021
20 checks passed
@gziolo gziolo deleted the fix/use-non-deprecated-import branch Aug 23, 2021
@github-actions github-actions bot added this to the Gutenberg 11.4 milestone Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants