From f8b8a8ef76b3557f0c4df29c703146deff8f0139 Mon Sep 17 00:00:00 2001 From: Oliver Hoff Date: Sun, 7 Apr 2019 17:30:09 +0200 Subject: [PATCH] update migration.md with vue changes introduced in sb5 --- MIGRATION.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MIGRATION.md b/MIGRATION.md index ad3785197487..6a7879ceac3b 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -14,6 +14,7 @@ - [Addon a11y uses parameters](#addon-a11y-uses-parameters-decorator-renamed) - [New keyboard shortcuts defaults](#new-keyboard-shortcuts-defaults) - [New URL structure](#new-url-structure) + - [Vue integration](#vue-integration) - [From version 4.0.x to 4.1.x](#from-version-40x-to-41x) - [Private addon config](#private-addon-config) - [React 15.x](#react-15x) @@ -191,7 +192,7 @@ Here is the mapping from old options to new: Storybook v5 removes the search dialog box in favor of a quick search in the navigation view, so `showSearchBox` has been removed. -Storybook v5 introduce a new tool bar above the story view and you can show\hide it with the new `isToolshown` option. +Storybook v5 introduce a new tool bar above the story view and you can show\hide it with the new `isToolshown` option. ## Individual story decorators @@ -351,6 +352,12 @@ https://url-of-storybook?path=/story/ The structure of `storyId` is a slugified `--` (slugified = lowercase, hyphen-separated). Each `storyId` must be unique. We plan to build more features into Storybook in upcoming versions based on this new structure. +## Vue integration + +The Vue integration was updated, so that every story returned from a story or decorator function is now being normalized with `Vue.extend` **and** is being wrapped by a functional component. Returning a string from a story or decorator function is still supported and is treated as a component with the returned string as the template. + +Currently there is no recommended way of accessing the component options of a story inside a decorator. + ## From version 4.0.x to 4.1.x There are are a few migrations you should be aware of in 4.1, including one unintentionally breaking change for advanced addon usage.