From 5c5febb7a384545155d3849c97c9e8c9a67296d7 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 1 Feb 2024 10:07:56 +0100 Subject: [PATCH] add migration note for users about tabId --- MIGRATION.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 6c4a05c8b8b5..3e5989bd7e36 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,6 +1,7 @@

Migration

- [From version 7.x to 8.0.0](#from-version-7x-to-800) + - [Tab addons are now routed to a query parameter](#tab-addons-are-now-routed-to-a-query-parameter) - [Default keyboard shortcuts changed](#default-keyboard-shortcuts-changed) - [Manager addons are now rendered with React 18](#manager-addons-are-now-rendered-with-react-18) - [Removal of `storiesOf`-API](#removal-of-storiesof-api) @@ -70,7 +71,7 @@ - [`createChannel` from `@storybook/postmessage` and `@storybook/channel-websocket`](#createchannel-from-storybookpostmessage-and-storybookchannel-websocket) - [StoryStore and methods deprecated](#storystore-and-methods-deprecated) - [Addon author changes](#addon-author-changes) - - [Tab addons are now routed to a query parameter](#tab-addons-are-now-routed-to-a-query-parameter) + - [Tab addons cannot manually route, Tool addons can filter their visibility via tabId](#tab-addons-cannot-manually-route-tool-addons-can-filter-their-visibility-via-tabid) - [Removed `config` preset](#removed-config-preset-1) - [From version 7.5.0 to 7.6.0](#from-version-750-to-760) - [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated) @@ -387,6 +388,12 @@ ## From version 7.x to 8.0.0 +### Tab addons are now routed to a query parameter + +The URL of a tab used to be: `http://localhost:6006/?path=/my-addon-tab/my-story`. + +The new URL of a tab is `http://localhost:6006/?path=/story/my-story&tab=my-addon-tab`. + ### Default keyboard shortcuts changed The default keyboard shortcuts have changed to avoid any conflicts with the browser's default shortcuts or when you are directly typing in the Manager. If you want to get the new default shortcuts, you can reset your shortcuts in the keyboard shortcuts panel by pressing the `Restore default` button. @@ -1051,7 +1058,7 @@ Note that both these methods require initialization, so you should await `previe ### Addon author changes -#### Tab addons are now routed to a query parameter +#### Tab addons cannot manually route, Tool addons can filter their visibility via tabId The TAB type addons now should no longer specify the `match` or `route` property. @@ -1091,8 +1098,6 @@ addons.register("my-addon", () => { }); ``` -The URL the tab gets rendered on will be `http://localhost:6006/?path=/story/my-story&tab=my-addon/tab`. - #### Removed `config` preset In Storybook 7.0 we have deprecated the preset field `config` and it has been replaced with `previewAnnotations`. The `config` preset is now completely removed in Storybook 8.0.