storybookjs / storybook

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

Certain toolbar actions not working inside composition-added stories #18925

Open ThatRacerGuy opened 2 years ago

ThatRacerGuy commented 2 years ago

Describe the bug I added another Storybook to my local Storybook, as described in https://storybook.js.org/docs/react/sharing/storybook-composition. The new stories loaded somewhat properly, but had several JS errors associated with trying to use the toolbar buttons background, resize viewport. Those buttons still worked with stories within the local Storybook, but would not work with composition-added stories.

To Reproduce Added to the main.js file:

module.exports = {
  refs: {
    'design-system': {
      title: "Storybook Design System",
      url: "https://5ccbc373887ca40020446347-yldsqjoxzb.chromatic.com",
      expanded: false // optional, true by default
    },
  },
}

System System: OS: macOS 12.4 CPU: (8) arm64 Apple M1 Binaries: Node: 16.15.0 - /opt/homebrew/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 8.5.5 - /opt/homebrew/bin/npm Browsers: Chrome: 104.0.5112.79 Safari: 15.5 npmPackages: @storybook/addon-actions: ^6.5.10 => 6.5.10 @storybook/addon-essentials: ^6.5.10 => 6.5.10 @storybook/addon-interactions: ^6.5.10 => 6.5.10 @storybook/addon-links: ^6.5.10 => 6.5.10 @storybook/builder-webpack5: ^6.5.10 => 6.5.10 @storybook/manager-webpack5: ^6.5.10 => 6.5.10 @storybook/node-logger: ^6.5.10 => 6.5.10 @storybook/preset-create-react-app: ^4.1.2 => 4.1.2 @storybook/react: ^6.5.10 => 6.5.10 @storybook/storybook-deployer: ^2.8.12 => 2.8.12 @storybook/testing-library: ^0.0.13 => 0.0.13 @storybook/testing-react: ^1.3.0 => 1.3.0 @storybook/theming: ^6.5.10 => 6.5.10

Additional context Using builder: "webpack5"

Ruben-E commented 1 year ago

Same issue here.

According to the docs:

Limitation: Addons in composed Storybooks will not work as they normally do in a non-composed Storybook.

Would this basic functionality (a.o. viewports) also be limited by this or is this an actual bug?