storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.08k stars 9.25k forks source link

[Bug]: Action in object disappears in Controls panel #29207

Open HanneloreVerbraekel opened 2 days ago

HanneloreVerbraekel commented 2 days ago

Describe the bug

After upgrading from Storybook 6 to Storybook 8, we are experiencing an issue when trying to show an object with an Action (import { action } from '@storybook/addon-actions';) in our Controls.

This is our link arg:

image

This is what we expect, and is shown on the Docs page: image

This is what actually happens: image

The Action does work as expected and is shown in the Actions tab when clicking the link, but it isn't shown in the link object on the Controls.

Reproduction link

https://stackblitz.com/edit/github-39beua?file=src%2Fstories%2FButton.stories.ts

Reproduction steps

  1. Set up a story with controls.
  2. Add an argument with type object to your args, one of the properties should contain an action. (import { action } from '@storybook/addon-actions;)

Expected result: Object is fully shown in controls. Actual result: The property containing an action is missing from the Object in the controls.

System

Storybook Environment Info:

  System:
    OS: macOS 14.6.1
    CPU: (12) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm <----- active
    pnpm: 9.5.0 - ~/.nvm/versions/node/v18.18.2/bin/pnpm
  Browsers:
    Chrome: 129.0.6668.59
    Edge: 129.0.2792.52
    Safari: 17.6
  npmPackages:
    @storybook/addon-actions: ^8.3.0 => 8.3.0 
    @storybook/addon-essentials: ^8.3.0 => 8.3.0 
    @storybook/addon-links: ^8.3.0 => 8.3.0 
    @storybook/addon-storysource: ^8.3.0 => 8.3.0 
    @storybook/addon-styling-webpack: ^1.0.0 => 1.0.0 
    @storybook/ember: ^8.3.0 => 8.3.0 
    @storybook/ember-cli-storybook: ^0.6.1 => 0.6.1 
    storybook: ^8.3.0 => 8.3.0

Additional context

No response