Skip to content

Commit

Permalink
Merge pull request #25248 from storybookjs/docs_fix_doc_blocks_apis
Browse files Browse the repository at this point in the history
Docs: Doc Blocks  updates for known limitations
  • Loading branch information
jonniebigodes authored Dec 22, 2023
2 parents aa37ebd + d92b6aa commit 76340fc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/doc-block-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import * as ButtonStories from './Button.stories'

<Callout variant="warning">

The Controls doc block will only have functioning UI controls if you have also installed and registered [`@storybook/addon-controls`](../essentials/controls.md) (included in [`@storybook/addon-essentials`](../essentials/index.md)).
The Controls doc block will only have functioning UI controls if you have also installed and registered [`@storybook/addon-controls`](../essentials/controls.md) (included in [`@storybook/addon-essentials`](../essentials/index.md)) and haven't turned off inline stories with the [`inline`](./doc-block-story.md#inline) configuration option.

</Callout>

Expand Down
12 changes: 12 additions & 0 deletions docs/api/doc-block-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ Light mode is only supported when the `Source` block is rendered independently.

</Callout>

<IfRenderer renderer={['angular', 'react', 'html', 'web-components' ]}>

### `excludeDecorators`

Type: `boolean`

Default: `parameters.docs.source.excludeDecorators`

Determines if [decorators](../writing-stories/decorators.md) are rendered in the source code snippet.

</IfRenderer>

### `format`

Type: `boolean | 'dedent' | BuiltInParserName`
Expand Down
6 changes: 6 additions & 0 deletions docs/api/doc-block-story.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ Default: `parameters.docs.story.inline` or `true` (for [supported frameworks](..

Determines whether the story is rendered `inline` (in the same browser frame as the other docs content) or in an iframe.

<Callout variant="info">

Setting the `inline` option to false will prevent the associated [controls](./doc-block-controls.md) from updating the story within the documentation page. This is a known limitation of the current implementation and will be addressed in a future release.

</Callout>

### `meta`

Type: CSF file exports
Expand Down
4 changes: 4 additions & 0 deletions docs/writing-docs/autodocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ Additionally, if you're developing using TypeScript, you may need to update Stor

If you're still encountering issues, we recommend reaching out to the community using the default communication channels (e.g., [GitHub discussions](https://github.com/storybookjs/storybook/discussions/new?category=help)).

### The controls are not updating the story within the auto-generated documentation

If you turned off inline rendering for your stories via the [`inline`](../api/doc-block-story.md#inline) configuration option, you would run into a situation where the associated controls are not updating the story within the documentation page. This is a known limitation of the current implementation and will be addressed in a future release.

#### Learn more about Storybook documentation

- Autodocs for creating documentation for your stories
Expand Down
4 changes: 4 additions & 0 deletions docs/writing-docs/mdx.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@ Additionally, if you're working with VSCode, you can add the [MDX extension](htt

If you're still encountering issues, we recommend reaching out to the community using the default communication channels (e.g., [GitHub discussions](https://github.com/storybookjs/storybook/discussions/new?category=help)).

### The controls are not updating the story within the MDX documentation page

If you turned off inline rendering for your stories via the [`inline`](../api/doc-block-story.md#inline) configuration option, you would run into a situation where the associated controls are not updating the story within the documentation page. This is a known limitation of the current implementation and will be addressed in a future release.

#### Learn more about Storybook documentation

- [Autodocs](./autodocs.md) for creating documentation for your stories
Expand Down

0 comments on commit 76340fc

Please sign in to comment.