question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Control addon warning on fully configured story

See original GitHub issue

Describe the bug The “This story is not configured to handle controls.” warning is show on a story with no controls but only actions:

Expected behavior The warning should not be shown as all props are being handled by the control addons

Screenshots image

Code snippets The component:

import React from "react";

export interface TestButtonProps {
  onFoo: (something: string) => void;
}

export const TestButton = ({
  onFoo,
}: TestButtonProps) => (
  <button onClick={() => onFoo("pwouet")}>
    TODO
  </button>
);

The story:

import React from "react";
import { TestButton, TestButtonProps } from "./TestButton";

export default {
  title: "Components / TestButton",
  component: TestButton,
};

export const Preview = (args: TestButtonProps) => <TestButton {...args} />;

I have configure the action addons globally in the preview.js file:

// ...
export const parameters = {
  actions: {
    argTypesRegex: "^on.*",
  },
  // ...
};

System:

Environment Info:

  System:
    OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
  Binaries:
    Node: 14.4.0 - /home/linuxbrew/.linuxbrew/bin/node
    Yarn: 1.22.4 - /usr/bin/yarn
    npm: 6.14.4 - /home/linuxbrew/.linuxbrew/bin/npm
  Browsers:
    Chrome: 84.0.4147.105
    Firefox: 79.0
  npmPackages:
    @storybook/addon-actions: ^6.0.0-rc.23 => 6.0.0-rc.23 
    @storybook/addon-backgrounds: ^6.0.0-rc.23 => 6.0.0-rc.23 
    @storybook/addon-controls: ^6.0.0-rc.23 => 6.0.0-rc.23 
    @storybook/addon-docs: ^6.0.0-rc.23 => 6.0.0-rc.23 
    @storybook/addon-knobs: ^6.0.0-rc.23 => 6.0.0-rc.23 
    @storybook/addon-storysource: ^6.0.0-rc.23 => 6.0.0-rc.23 
    @storybook/addon-viewport: ^6.0.0-rc.23 => 6.0.0-rc.23 
    @storybook/addons: ^6.0.0-rc.23 => 6.0.0-rc.23 
    @storybook/react: ^6.0.0-rc.23 => 6.0.0-rc.23

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
angrycat9000commented, Aug 19, 2020

Ok did a little more testing. All is good using 6.0.9, but breaks at 6.0.10

Thanks for the insight about the versions. I just tested in my environment and can confirm the same behavior.

0reactions
shilmancommented, Jul 2, 2021

@rwwagner90 this should work for vue. there are a lot of different ways to write vue components (SFC, jsx, etc.) but the common ones should be supported. if you want to open a new issue with a repro from npx sb@next repro I’d be happy to take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Controls - Storybook - JS.ORG
Storybook Controls gives you a graphical UI to interact with a component's arguments dynamically without needing to code. It creates an addon panel...
Read more >
@storybook/addon-controls - npm
Angular. Template stories. Configuration. Control annotations; Parameters. Expanded: show property documentation; Hide NoControls warning.
Read more >
Next-level component showcasing with Storybook controls
Learn about controls, a new Storybook addon that lets you dynamically interact with your React components for demo and testing purposes.
Read more >
@storybook/addon-controls - npm package | Snyk
Learn more about @storybook/addon-controls: package health score, popularity, ... row completely and disable controls for the label row on a specific story.
Read more >
LoCA - Loss of Control Aler... - Addons - World of Warcraft
The list of alerts being tracked might not be complete, do let me know of any debuffs you think should be added here....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found