From 55952dc1328259b5cc98622bd4e539f2d2af6234 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 15 Jul 2020 12:36:47 +0200 Subject: [PATCH] docs(MIGRATION): update hierarchy separator section Updated the command to work in any scenario and added a note about mdx. --- MIGRATION.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 9f25925dfb8..6b470db097d 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -383,10 +383,10 @@ The story store no longer emits `renderCurrentStory`/`RENDER_CURRENT_STORY` to t We've removed the ability to specify the hierarchy separators (how you control the grouping of story kinds in the sidebar). From Storybook 6.0 we have a single separator `/`, which cannot be configured. -If you are currently using using custom separators, we encourage you to migrate to using `/` as the sole separator. If you are using `|` or `.` as a separator currently, we provide a codemod, [`upgrade-hierarchy-separators`](https://github.com/storybookjs/storybook/blob/next/lib/codemod/README.md#upgrade-hierarchy-separators), that can be used to rename all your components. +If you are currently using using custom separators, we encourage you to migrate to using `/` as the sole separator. If you are using `|` or `.` as a separator currently, we provide a codemod, [`upgrade-hierarchy-separators`](https://github.com/storybookjs/storybook/blob/next/lib/codemod/README.md#upgrade-hierarchy-separators), that can be used to rename your components. **Note: the codemod will not work for `.mdx` components, you will need to make the changes by hand.** ``` -yarn sb migrate upgrade-hierarchy-separators --glob="*.stories.js" +npx sb@next migrate upgrade-hierarchy-separators --glob="*/**/*.stories.@(tsx|jsx|ts|js)" ``` We also now default to showing "roots", which are non-expandable groupings in the sidebar for the top-level groups. If you'd like to disable this, set the `showRoots` option in `.storybook/manager.js`: