Skip to content

Commit

Permalink
remove legacy mdx 1 feature documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jan 3, 2024
1 parent 2c6afe2 commit 97ae404
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 58 deletions.
6 changes: 4 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- [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)
- [MDX related changes](#mdx-related-changes)
- [MDX is upgraded to v3](#mdx-is-upgraded-to-v3)
- [Dropping support for \*.stories.mdx (CSF in MDX) format](#dropping-support-for-storiesmdx-csf-in-mdx-format)
- [Dropping support for \*.stories.mdx (CSF in MDX) format and MDX1 support](#dropping-support-for-storiesmdx-csf-in-mdx-format-and-mdx1-support)
- [Dropping support for id, name and story in Story block](#dropping-support-for-id-name-and-story-in-story-block)
- [Core changes](#core-changes)
- [Dropping support for Node.js 16](#dropping-support-for-nodejs-16)
Expand Down Expand Up @@ -390,10 +390,12 @@ To summarize:

Storybook now uses MDX3 under the hood. This change contains many improvements and a few small breaking changes that probably won't affect you. However we recommend checking the [migration notes from MDX here](https://mdxjs.com/blog/v3/).

#### Dropping support for *.stories.mdx (CSF in MDX) format
#### Dropping support for *.stories.mdx (CSF in MDX) format and MDX1 support

In Storybook 7, we deprecated the ability of using MDX both for documentation and for defining stories in the same .stories.mdx file. It is now removed, and Storybook won't support .stories.mdx files anymore. We provide migration scripts to help you onto the new format.

If you were using the [legacy MDX1 format](#legacy-mdx1-support), you will have to remove the `legacyMdx1` main.js feature flag and the `@storybook/mdx1-csf` package.

Alongside with this change, the `jsxOptions` configuration was removed as it is not used anymore.

[More info here](https://storybook.js.org/docs/migration-guide#storiesmdx-to-mdxcsf).
Expand Down
1 change: 0 additions & 1 deletion code/addons/docs/src/plugins/mdx-plugin.types.d.ts

This file was deleted.

17 changes: 0 additions & 17 deletions docs/api/main-config-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,6 @@ Apply decorators from preview.js before decorators from addons or frameworks. [M

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

## `legacyMdx1`

Type: `boolean`

Enables support for MDX version 1 as a fallback. Requires [@storybook/mdx1-csf](https://github.com/storybookjs/mdx1-csf) to be installed.

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

<CodeSnippets
paths={[
'common/main-config-features-legacy-mdx-1.js.mdx',
'common/main-config-features-legacy-mdx-1.ts.mdx',
]}
/>

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

## `storyStoreV7`

Type: `boolean`
Expand Down
1 change: 0 additions & 1 deletion docs/configure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Additionally, you can also provide additional feature flags to your Storybook co
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `storyStoreV7` | Configures Storybook to load stories [on demand](#on-demand-story-loading), rather than during boot up (defaults to `true` as of `v7.0`) <br/> `features: { storyStoreV7: true }` |
| `buildStoriesJson` | Generates `index.json` and `stories.json` files to help story loading with the on-demand mode (defaults to `true` when `storyStoreV7` is `true`) <br/> `features: { buildStoriesJson: true }` |
| `legacyMdx1` | Enables support for MDX version 1 as a fallback. Requires [`@storybook/mdx1-csf`](https://github.com/storybookjs/mdx1-csf) <br/> `features: { legacyMdx1: true }` |

## Configure story loading

Expand Down
20 changes: 0 additions & 20 deletions docs/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,26 +94,6 @@ This shows the errors visually in your editor, which speeds things up a lot. Her

![MDX errors showing in VS Code](./assets/mdx-vs-code-extension-errors.gif)

#### MDX1 as fallback

If, for some reason, you are unable to get MDX2 working, we’ve implemented legacy MDX1 support as a last resort. MDX1 is deprecated and opt-in, and we recommend against it unless you really need it.

To use MDX1:

1. Install `@storybook/mdx1-csf` as a dev dependency
2. Add the `legacyMdx1` feature flag to your `.storybook/main.js`:

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

<CodeSnippets
paths={[
'common/main-config-features-legacy-mdx-1.js.mdx',
'common/main-config-features-legacy-mdx-1.ts.mdx'
]}
/>

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

### storiesOf support discontinued by default

If you use Storybook’s legacy `storiesOf` API, it is no longer supported by default in Storybook 7.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/verdaccio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,6 @@ packages:
access: $all
publish: $all
proxy: npmjs
'@storybook/mdx1-csf':
access: $all
publish: $all
proxy: npmjs
'@storybook/mdx2-csf':
access: $all
publish: $all
proxy: npmjs
'@storybook/expect':
access: $all
publish: $all
Expand Down

0 comments on commit 97ae404

Please sign in to comment.