Skip to content

Commit

Permalink
Merge pull request #23060 from storybookjs/no-deprecated-in-headings
Browse files Browse the repository at this point in the history
Docs: Remove "(deprecated)" & "(required)" from headings
(cherry picked from commit 0fd5665)
  • Loading branch information
kylegach authored and github-actions[bot] committed Jun 21, 2023
1 parent 952c4fc commit 107e8ca
Show file tree
Hide file tree
Showing 18 changed files with 100 additions and 44 deletions.
4 changes: 3 additions & 1 deletion docs/api/arg-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ If you only need to specify the documented type, you should use [`table.type`](#

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

### `defaultValue` (deprecated)
### `defaultValue`

(⛔️ **Deprecated**)

Type: `any`

Expand Down
24 changes: 18 additions & 6 deletions docs/api/doc-block-canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,37 +202,49 @@ Default: `parameters.docs.canvas.withToolbar`

Determines whether to render a toolbar containing tools to interact with the story.

### `children` (deprecated)
### `children`

(⛔️ **Deprecated**)

Type: `React.ReactNode`

Expects only [Story](./doc-block-story.md) children. Reference the story with the `of` prop instead.

### `columns` (deprecated)
### `columns`

(⛔️ **Deprecated**)

Type: `number`

Splits the stories based on the number of defined columns. Multiple stories are not supported.

### `isColumn` (deprecated)
### `isColumn`

(⛔️ **Deprecated**)

Type: `boolean`

Displays the stories one above the other. Multiple stories are not supported.

### `mdxSource` (deprecated)
### `mdxSource`

(⛔️ **Deprecated**)

Type: `string`

Provides source to display. Use [`source.code`](#source) instead.

### `withSource` (deprecated)
### `withSource`

(⛔️ **Deprecated**)

Type: `'open' | 'closed' | 'none'`

Controls the source code block visibility. Use [`sourceState`](#sourcestate) instead.

### `withToolbar` (deprecated)
### `withToolbar`

(⛔️ **Deprecated**)

Type: `boolean`

Expand Down
12 changes: 9 additions & 3 deletions docs/api/doc-block-colorpalette.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,25 @@ import { ColorItem } from '@storybook/blocks';

`ColorItem` is configured with the following props:

### `colors` (required)
### `colors`

(**Required**)

Type: `string[] | { [key: string]: string }`

Provides the list of colors to be displayed. Accepts any valid CSS color format (hex, RGB, HSL, etc.). When an object is provided, the keys will be displayed above the values.

### `subtitle` (required)
### `subtitle`

(**Required**)

Type: `string`

Provides an additional description of the color.

### `title` (required)
### `title`

(**Required**)

Type: `string`

Expand Down
12 changes: 9 additions & 3 deletions docs/api/doc-block-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,25 @@ Specifies where to pull the description from. It can either point to a story or

Descriptions are pulled from the JSDoc comments or parameters, and they are rendered as markdown. See [Writing descriptions](#writing-descriptions) for more details.

### `children` (deprecated)
### `children`

(⛔️ **Deprecated**)

Type: `string`

See [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#description-block-parametersnotes-and-parametersinfo).

### `markdown` (deprecated)
### `markdown`

(⛔️ **Deprecated**)

Type: `string`

See [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#description-block-parametersnotes-and-parametersinfo).

### `type` (deprecated)
### `type`

(⛔️ **Deprecated**)

Type: `'info' | 'notes' | 'docgen' | 'auto'`

Expand Down
4 changes: 3 additions & 1 deletion docs/api/doc-block-icongallery.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ import { IconItem } from '@storybook/blocks';

`IconItem` is configured with the following props:

### `name` (required)
### `name`

(**Required**)

Type: `string`

Expand Down
4 changes: 3 additions & 1 deletion docs/api/doc-block-primary.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import { Primary } from '@storybook/blocks';

`Primary` is configured with the following props:

### `name` (deprecated)
### `name`

(⛔️ **Deprecated**)

Type: `string`

Expand Down
8 changes: 6 additions & 2 deletions docs/api/doc-block-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,17 @@ Specifies how the source code is rendered.

</div>

### `id` (deprecated)
### `id`

(⛔️ **Deprecated**)

Type: `string`

Specifies the story id for which to render the source code. Referencing a story this way is no longer supported; use the [`of` prop](#of), instead.

### `ids` (deprecated)
### `ids`

(⛔️ **Deprecated**)

Type: `string[]`

Expand Down
40 changes: 30 additions & 10 deletions docs/api/doc-block-story.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,61 +124,81 @@ Type: Story export

Specifies which story is rendered by the `Story` block. If no `of` is defined and the MDX file is [attached](./doc-block-meta.md#attached-vs-unattached), the primary (first) story will be rendered.

### `args` (deprecated)
### `args`

(⛔️ **Deprecated**)

Type: `Partial<TArgs>`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `argTypes` (deprecated)
### `argTypes`

(⛔️ **Deprecated**)

Type: `Partial<ArgTypes<TArgs>>`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `decorators` (deprecated)
### `decorators`

(⛔️ **Deprecated**)

Type: `DecoratorFunction<TRenderer, TArgs>[]`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `loaders` (deprecated)
### `loaders`

(⛔️ **Deprecated**)

Type: `LoaderFunction<TRenderer, TArgs>[]`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `name` (deprecated)
### `name`

(⛔️ **Deprecated**)

Type: `StoryName`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `parameters` (deprecated)
### `parameters`

(⛔️ **Deprecated**)

Type: `Parameters`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `play` (deprecated)
### `play`

(⛔️ **Deprecated**)

Type: `PlayFunction<TRenderer, TArgs>`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `render` (deprecated)
### `render`

(⛔️ **Deprecated**)

Type: `ArgsStoryFn<TRenderer, TArgs>`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `story` (deprecated)
### `story`

(⛔️ **Deprecated**)

Type: `Omit<StoryAnnotations<TRenderer, TArgs>, 'story'>`

Defining and configuring stories in MDX is deprecated. See the [Migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mdx-docs-files) for details.

### `storyName` (deprecated)
### `storyName`

(⛔️ **Deprecated**)

Type: `StoryName`

Expand Down
4 changes: 3 additions & 1 deletion docs/api/doc-block-useof.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ useOf = (

## Parameters

### `moduleExportOrType` (required)
### `moduleExportOrType`

(**Required**)

Type: `ModuleExport | 'story' | 'meta' | 'component'`

Expand Down
4 changes: 2 additions & 2 deletions docs/api/main-config-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: 'config'
---

(⛔️ **Deprecated**)

Parent: [main.js|ts configuration](./main-config.md)

Type: `string[] | ((config: string[], options: Options) => string[] | Promise<string[]>)`

Deprecated: `true`

Add additional scripts to run in the story preview. Deprecated in favor of [`previewAnnotations`](./main-config-preview-annotations.md).
4 changes: 2 additions & 2 deletions docs/api/main-config-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
title: 'framework'
---

(**Required**)

Parent: [main.js|ts configuration](./main-config.md)

Type: `FrameworkName | { name: FrameworkName; options?: FrameworkOptions }`

Required: `true`

Configures Storybook based on a set of [framework-specific](../configure/frameworks.md) settings.

For available frameworks and their options, see their respective [documentation](https://github.com/storybookjs/storybook/tree/next/code/frameworks).
Expand Down
8 changes: 4 additions & 4 deletions docs/api/main-config-stories.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: 'stories'
---

(**Required**)

Parent: [main.js|ts configuration](./main-config.md)

Type:
Expand All @@ -11,8 +13,6 @@ Type:
| async (list: (string | StoriesSpecifier)[]) => (string | StoriesSpecifier)[]
```

Required: `true`

Configures Storybook to load stories from the specified locations. The intention is for you to colocate a story file along with the component it documents:

```
Expand Down Expand Up @@ -91,9 +91,9 @@ Type:

#### `StoriesSpecifier.directory`

Type: `string`
(**Required**)

Required: `true`
Type: `string`

Where to start looking for story files, relative to the root of your project.

Expand Down
6 changes: 3 additions & 3 deletions docs/api/main-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ A typical Storybook configuration file looks like this:

An object to configure Storybook containing the following properties:

- [`framework`](./main-config-framework.md) (required)
- [`stories`](./main-config-stories.md) (required)
- [`framework`](./main-config-framework.md) (Required)
- [`stories`](./main-config-stories.md) (Required)
- [`addons`](./main-config-addons.md)
- [`babel`](./main-config-babel.md)
- [`babelDefault`](./main-config-babel-default.md)
Expand All @@ -44,4 +44,4 @@ An object to configure Storybook containing the following properties:
- [`typescript`](./main-config-typescript.md)
- [`viteFinal`](./main-config-vite-final.md)
- [`webpackFinal`](./main-config-webpack-final.md)
- [`config`](./main-config-config.md) (deprecated)
- [`config`](./main-config-config.md) (⛔️ Deprecated)
2 changes: 1 addition & 1 deletion docs/snippets/angular/arg-types-default-value.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const meta: Meta<Example> = {
component: Example,
argTypes: {
value: {
// Deprecated
// ⛔️ Deprecated, do not use
defaultValue: 0,
},
},
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/common/arg-types-default-value.js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
component: Example,
argTypes: {
value: {
// Deprecated
// ⛔️ Deprecated, do not use
defaultValue: 0,
},
},
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/common/arg-types-default-value.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const meta: Meta<typeof Example> = {
component: Example,
argTypes: {
value: {
// Deprecated
// ⛔️ Deprecated, do not use
defaultValue: 0,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
component: 'demo-example',
argTypes: {
value: {
// Deprecated
// ⛔️ Deprecated, do not use
defaultValue: 0,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const meta: Meta = {
component: 'demo-example',
argTypes: {
value: {
// Deprecated
// ⛔️ Deprecated, do not use
defaultValue: 0,
},
},
Expand Down

0 comments on commit 107e8ca

Please sign in to comment.