Skip to content

Commit

Permalink
Addon Controls: Remove unused hideNoControlsWarning type
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jan 3, 2024
1 parent 0aa50e9 commit fa2364c
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 132 deletions.
20 changes: 19 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>Migration</h1>

- [From version 7.x to 8.0.0](#from-version-7x-to-800)
- [Framework specific vite plugins have to be explicitly added](#framework-specific-vite-plugins-have-to-be-explicitly-added)
- [Framework-specific Vite plugins have to be explicitly added](#framework-specific-vite-plugins-have-to-be-explicitly-added)
- [Implicit actions can not be used during rendering (for example in the play function)](#implicit-actions-can-not-be-used-during-rendering-for-example-in-the-play-function)
- [Core changes](#core-changes)
- [Dropping support for Node.js 16](#dropping-support-for-nodejs-16)
Expand All @@ -24,6 +24,7 @@
- [Require Svelte 4 and up](#require-svelte-4-and-up)
- [Deprecations which are now removed](#deprecations-which-are-now-removed)
- [--use-npm flag in storybook CLI](#--use-npm-flag-in-storybook-cli)
- [hideNoControlsWarning parameter from addon controls](#hidenocontrolswarning-parameter-from-addon-controls)
- [From version 7.5.0 to 7.6.0](#from-version-750-to-760)
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
Expand All @@ -35,6 +36,7 @@
- [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers)
- [From version 7.0.0 to 7.2.0](#from-version-700-to-720)
- [Addon API is more type-strict](#addon-api-is-more-type-strict)
- [Addon-controls hideNoControlsWarning parameter is deprecated](#addon-controls-hidenocontrolswarning-parameter-is-deprecated)
- [From version 6.5.x to 7.0.0](#from-version-65x-to-700)
- [7.0 breaking changes](#70-breaking-changes)
- [Dropped support for Node 15 and below](#dropped-support-for-node-15-and-below)
Expand Down Expand Up @@ -531,6 +533,10 @@ Starting in 8.0, Storybook requires Svelte 4 and up.

The `--use-npm` is now removed. Use `--package-manager=npm` instead. [More info here](#cli-option---use-npm-deprecated).

#### hideNoControlsWarning parameter from addon controls

The `hideNoControlsWarning` parameter is now removed. [More info here](#addon-controls-hidenocontrolswarning-parameter-is-deprecated).

## From version 7.5.0 to 7.6.0

#### CommonJS with Vite is deprecated
Expand Down Expand Up @@ -711,6 +717,18 @@ The API: `addons.addPanel()` is now deprecated, and will be removed in 8.0.0. Pl

The `render` method can now be a `React.FunctionComponent` (without the `children` prop). Storybook will now render it, rather than calling it as a function.

#### Addon-controls hideNoControlsWarning parameter is deprecated

The `hideNoControlsWarning` parameter is now unused and deprecated, given that the UI of the Controls addon changed in a way that does not display that message anymore.

```ts
export const Primary = {
parameters: {
controls: { hideNoControlsWarning: true }, // this parameter is now unnecessary
},
};
```

## From version 6.5.x to 7.0.0

A number of these changes can be made automatically by the Storybook CLI. To take advantage of these "automigrations", run `npx storybook@latest upgrade --prerelease` or `pnpx dlx storybook@latest upgrade --prerelease`.
Expand Down
3 changes: 0 additions & 3 deletions code/addons/controls/src/ControlsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ interface ControlsParameters {
sort?: SortType;
expanded?: boolean;
presetColors?: PresetColor[];

/** @deprecated No longer used, will be removed in Storybook 8.0 */
hideNoControlsWarning?: boolean;
}

export const ControlsPanel: FC = () => {
Expand Down
20 changes: 0 additions & 20 deletions docs/essentials/controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,26 +409,6 @@ Consider the following snippet to force required args first:

<!-- prettier-ignore-end -->

#### Hide NoControls warning

If you don't plan to handle the control args inside your story, you can remove the warning with:

<!-- prettier-ignore-start -->

<CodeSnippets
paths={[
'angular/button-story-hide-nocontrols-warning.ts.mdx',
'web-components/button-story-hide-nocontrols-warning.js.mdx',
'web-components/button-story-hide-nocontrols-warning.ts.mdx',
'common/button-story-hide-nocontrols-warning.js.mdx',
'common/button-story-hide-nocontrols-warning.ts.mdx',
]}
usesCsf3
csf2Path="essentials/controls#snippet-button-story-hide-nocontrols-warning"
/>

<!-- prettier-ignore-end -->

### Disable controls for specific properties

Aside from the features already documented here, Controls can also be disabled for individual properties.
Expand Down
20 changes: 0 additions & 20 deletions docs/snippets/angular/button-story-hide-nocontrols-warning.ts.mdx

This file was deleted.

15 changes: 0 additions & 15 deletions docs/snippets/common/button-story-hide-nocontrols-warning.js.mdx

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions docs/snippets/common/button-story-hide-nocontrols-warning.ts.mdx

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit fa2364c

Please sign in to comment.