Skip to content

Commit

Permalink
Merge pull request #23417 from storybookjs/chore_docs_add_disable_not…
Browse files Browse the repository at this point in the history
…ification_config

Docs: Adds the disable notification to the documentation
  • Loading branch information
jonniebigodes authored Jul 12, 2023
2 parents f76b060 + a63cfe2 commit 2d47945
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
18 changes: 18 additions & 0 deletions docs/api/main-config-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Type:
disableProjectJson?: boolean;
disableTelemetry?: boolean;
disableWebpackDefaults?: boolean;
disableWhatsNewNotifications?: boolean;
enableCrashReports?: boolean;
renderer?: RendererName;
}
Expand Down Expand Up @@ -165,6 +166,23 @@ Disables Storybook's default Webpack configuration.

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

## `disableWhatsNewNotifications`

Type: `boolean`

Disables the "What's New" notifications in the UI for new Storybook versions and ecosystem updates (e.g., [addons](https://storybook.js.org/integrations/), [content](https://storybook.js.org/blog/), etc.).

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

<CodeSnippets
paths={[
'common/main-config-core-disable-update-notifications.js.mdx',
'common/main-config-core-disable-update-notifications.ts.mdx',
]}
/>

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

## `enableCrashReports`

Type: `boolean`
Expand Down
6 changes: 3 additions & 3 deletions docs/configure/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ Storybook's main configuration (i.e., the `main.js|ts`) defines your Storybook p
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `stories` | The array of globs that indicates the [location of your story files](#configure-story-loading), relative to `main.js` |
| `staticDirs` | Sets a list of directories of [static files](./images-and-assets.md#serving-static-files-via-storybook-configuration) to be loaded by Storybook <br/> `staticDirs: ['../public']` |
| `addons` | Sets the list of [addons](https://storybook.js.org/addons/) loaded by Storybook <br/> `addons: ['@storybook/addon-essentials']` |
| `addons` | Sets the list of [addons](https://storybook.js.org/integrations) loaded by Storybook <br/> `addons: ['@storybook/addon-essentials']` |
| `typescript` | Configures how Storybook handles [TypeScript files](./typescript.md) <br/> `typescript: { check: false, checkOptions: {} }` |
| `framework` | Configures Storybook based on a set of [framework-specific](./frameworks.md) settings <br/> `framework: { name: '@storybook/svelte-vite', options:{} }` |
| `core` | Configures Storybook's internal features<br/> `core: { disableTelemetry: true, }` |
| `core` | Configures Storybook's [internal features](../api/main-config-core.md) <br/> `core: { disableTelemetry: true, }` |
| `docs` | Configures Storybook's [auto-generated documentation](../writing-docs/autodocs.md)<br/> `docs: { autodocs: 'tag' }` |
| `features` | Enables Storybook's additional features<br/> See table below for a list of available features `features: { storyStoreV7: true }` |
| `features` | Enables Storybook's [additional features](../api/main-config-features.md)<br/> See table below for a list of available features `features: { storyStoreV7: true }` |
| `refs` | Configures [Storybook composition](../sharing/storybook-composition.md) <br/> `refs:{ example: { title: 'ExampleStorybook', url:'https://your-url.com' } }` |
| `logLevel` | Configures Storybook's logs in the browser terminal. Useful for debugging <br/> `logLevel: 'debug'` |
| `webpackFinal` | Customize Storybook's [Webpack](../builders/webpack.md) setup <br/> `webpackFinal: async (config:any) => { return config; }` |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```js
// .storybook/main.js

export default {
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
core: {
disableWhatsNewNotifications: true,
},
};
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ts
// .storybook/main.ts

// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';

const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
core: {
disableWhatsNewNotifications: true,
},
};

export default config;
```

0 comments on commit 2d47945

Please sign in to comment.