-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: Cannot disable "Args table with interactive controls couldn't be auto-generated" panel #24422
Comments
Also experiencing this issue, I have tried the way you did and also like this: import type { Meta, StoryFn } from '@storybook/react';
import Spinner from '..';
export default {
title: 'Block Components/Spinner',
component: Spinner,
} as Meta;
const Template: StoryFn = () => <Spinner />;
export const Default = Template.bind( {} );
Default.args = {};
Default.parameters = { controls: { hideNoControlsWarning: true } }; and neither work for me unfortunately. Looks like it is deprecated but the docs should be updated to reflect that. |
@cdedreuille did you mean to deprecate cc @jonniebigodes for 8.0 docs update as well. Thanks both! |
When we updated the empty state for controls, we explicitly made sure it was showing the empty state every time. That's why |
Starting in 7.0, there are two doc blocks, |
The documentation about If no controls are available, we think it makes sense not to show them on the docs page since it is about presentation and not really about active development. WDYT @JReinhold? |
I would think we should completely remove that element - not showing either of Controls or ArgTypes - if we don't detect any |
@JReinhold @valentinpalkovic The idea is that on controls you get this empty state to present what the feature is about and how you can set up controls. But on docs, this empty state doesn't make sense. The proposition is as followed:
Does that work for both of you? |
Sounds perfect to me @cdedreuille |
For anyone who wants the empty args table hidden now, I have a crazy CSS selector that works to hide this table when empty, display it when not empty. I'm using Storybook 8, but I think this should work in other versions? If not, adjust the selectors as needed. In
|
@valentinpalkovic I was wondering if you think this is still realistic to make this change as part of SB8? |
Describe the bug
I have some purely visual components that take no props and simply render SVGs.
I've added the config as described here:
https://storybook.js.org/docs/react/essentials/controls#hide-nocontrols-warning
To hide the warning about there being no controls, but I still get a panel saying "Args table with interactive controls couldn't be auto-generated". I was expecting it to be hidden by this control parameter.
To Reproduce
Create a component that has no props.
Create a story
Set the option as shown:
Notice the "Args table with interactive controls couldn't be auto-generated" panel is still visible
System
Additional context
No response
The text was updated successfully, but these errors were encountered: