diff --git a/MIGRATION.md b/MIGRATION.md index ab90c0450655..57d74ea3afec 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -3,6 +3,7 @@ - [From version 6.1.x to 6.2.0](#from-version-61x-to-620) - [New Angular renderer](#new-angular-renderer) - [From version 6.0.x to 6.1.0](#from-version-60x-to-610) + - [Addon-backgrounds preset](#addon-backgrounds-preset) - [Single story hoisting](#single-story-hoisting) - [React peer dependencies](#react-peer-dependencies) - [6.1 deprecations](#61-deprecations) @@ -156,6 +157,27 @@ Please also file an issue if you need to opt out. We plan to remove the legacy r ## From version 6.0.x to 6.1.0 +### Addon-backgrounds preset + +In 6.1 we introduced an unintentional breaking change to `addon-backgrounds`. + +The addon uses decorators which are set up automatically by a preset. The required preset is ignored if you register the addon in `main.js` withe the the `/register` entry point. This used to be valid in `v6.0.x` and earlier: +```js +module.exports = { + stories: ['../**/*.stories.js'], + addons: ['@storybook/addon-backgrounds/register'], +}; +``` + +To fix it, just replace `@storybook/addon-backgrounds/register` with `@storybook/addon-backgrounds`: + +```js +module.exports = { + stories: ['../**/*.stories.js'], + addons: ['@storybook/addon-backgrounds'], +}; +``` + ### Single story hoisting Stories which have **no siblings** (i.e. the component has only one story) and which name **exactly matches** the component name will now be hoisted up to replace their parent component in the sidebar. This means you can have a hierarchy like this: