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

Core: Module format story decorators #7490

Merged
merged 5 commits into from
Jul 19, 2019
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Jul 19, 2019

Issue: #7486

What I did

See issue for description.

  • Update load to support story decorators
    • Warn on old-style usage
  • Update codemods
    • storiesof-to-module
    • module-to-mdx
    • mdx-to-module
  • Update MDX compiler & docs & examples

How to test

See Core|Decorators stories in official-storybook for e2e.

Also:

yarn jest --testPathPattern=convert-storiesof-to-module.test.js
yarn jest --testPathPattern=convert-mdx-to-module.test.js
yarn jest --testPathPattern=convert-module-to-mdx.test.js
yarn jest --testPathPattern=mdx-compiler-plugin.test.js

@vercel
Copy link

vercel bot commented Jul 19, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-7486-module-format-story-decorators.storybook.now.sh

@shilman shilman changed the title 7486 module format story decorators Core: Module format story decorators Jul 19, 2019
@shilman shilman added this to the 5.2.0 milestone Jul 19, 2019
@github-actions
Copy link
Contributor

Fails
🚫 PR is marked with "BREAKING CHANGE" label.

Generated by 🚫 dangerJS against f9b9a91

Copy link
Contributor

@leoyli leoyli left a comment

Choose a reason for hiding this comment

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

LGTM

@shilman shilman merged commit c8867c8 into next Jul 19, 2019
@shilman shilman deleted the 7486-module-format-story-decorators branch July 19, 2019 15:24
kind.add(name || key, storyFn, parameters);
const { name, parameters, decorators } = storyFn.story || {};
if (parameters && parameters.decorators) {
deprecate(() => {},
Copy link
Member

Choose a reason for hiding this comment

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

I think with these deprecate calls you want to create them only once so they only get logged once, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants