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

addons-actions is not working with addons-docs mdx format story #8757

Closed
jacklimwenjie opened this issue Nov 8, 2019 · 1 comment
Closed

Comments

@jacklimwenjie
Copy link

Describe the bug
addons-actions failed to be triggered when in a mdx format of story

To Reproduce
Steps to reproduce the behavior:

  1. Setup a Storybook with addons-actions and addons-docs.
  2. Create a story with mdx format.
  3. Try to use addon-actions in the story. For example:
<Story name="basic">
  <Button
    onClick={action("onClick")}
  />
</Story>
  1. When the button is clicked, the action is not logged.

Expected behavior
addon-actions should be able to be triggered in mdx format story like CSF story or story created using old API.

System:

Environment Info:

  System:
    OS: macOS 10.15.1
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 12.12.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.11.3 - /usr/local/bin/npm
  Browsers:
    Chrome: 78.0.3904.87
    Safari: 13.0.3
  npmPackages:
    @storybook/addon-actions: ^4.0.0||^5.0.0||5.2.0-beta.13 => 5.2.5 
    @storybook/addon-docs: ^5.2.5 => 5.2.5 
    @storybook/addon-knobs: ^5.2.5 => 5.2.5 
    @storybook/react: ^5.2.5 => 5.2.5 
@shilman
Copy link
Member

shilman commented Nov 8, 2019

@jacklimwenjie When the story is viewed in the canvas tab, an action is logged. E.g. https://storybookjs.now.sh/official-storybook/?path=/story/addons-docs-mdx--hello-story

When the story is viewed in the docs tab, it is not, which is a special case of #6700

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

No branches or pull requests

2 participants