From a088fc080c3fc98db1ac2ae4db13b82628afbd37 Mon Sep 17 00:00:00 2001 From: David Leuliette Date: Mon, 14 Oct 2024 11:27:34 +0200 Subject: [PATCH] docs: drop /react slug from addons reference --- code/addons/actions/ADVANCED.md | 2 +- code/addons/actions/README.md | 2 +- code/addons/backgrounds/README.md | 2 +- code/addons/controls/README.md | 6 +++--- code/addons/docs/docs/props-tables.md | 6 +++--- code/addons/toolbars/README.md | 4 ++-- code/addons/viewport/README.md | 2 +- code/core/src/preview-api/modules/store/inferArgTypes.ts | 4 ++-- code/lib/blocks/src/blocks/Canvas.stories.tsx | 2 +- code/lib/blocks/src/components/ArgsTable/ArgControl.tsx | 2 +- code/lib/blocks/src/examples/CanvasParameters.stories.tsx | 2 +- code/lib/test/src/testing-library.ts | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/code/addons/actions/ADVANCED.md b/code/addons/actions/ADVANCED.md index 7cca56342dee..d71320209288 100644 --- a/code/addons/actions/ADVANCED.md +++ b/code/addons/actions/ADVANCED.md @@ -1,6 +1,6 @@ ## Advanced/Legacy Actions usage -For basic usage, see the [documentation](https://storybook.js.org/docs/react/essentials/actions). +For basic usage, see the [documentation](https://storybook.js.org/docs/essentials/actions). This document describes the pre-6.0 usage of the addon, and as such is no longer recommended (although it will be supported until at least 7.0). diff --git a/code/addons/actions/README.md b/code/addons/actions/README.md index 80d2bd5d746c..a24f0e7052a2 100644 --- a/code/addons/actions/README.md +++ b/code/addons/actions/README.md @@ -24,4 +24,4 @@ export default { ## Usage -The basic usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/actions). For legacy usage, see the [advanced README](./ADVANCED.md). +The basic usage is documented in the [documentation](https://storybook.js.org/docs/essentials/actions). For legacy usage, see the [advanced README](./ADVANCED.md). diff --git a/code/addons/backgrounds/README.md b/code/addons/backgrounds/README.md index 481ba54bcd2f..a720847d4bf0 100644 --- a/code/addons/backgrounds/README.md +++ b/code/addons/backgrounds/README.md @@ -26,4 +26,4 @@ export default { ## Usage -The usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/backgrounds). +The usage is documented in the [documentation](https://storybook.js.org/docs/essentials/backgrounds). diff --git a/code/addons/controls/README.md b/code/addons/controls/README.md index 192a112e07fe..b3c097e53eeb 100644 --- a/code/addons/controls/README.md +++ b/code/addons/controls/README.md @@ -24,7 +24,7 @@ export default { ## Usage -The usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/controls). +The usage is documented in the [documentation](https://storybook.js.org/docs/essentials/controls). ## FAQs @@ -92,7 +92,7 @@ export const Reflow = () => { }; ``` -And again, as above, this can be rewritten using [fully custom args](https://storybook.js.org/docs/react/essentials/controls#fully-custom-args): +And again, as above, this can be rewritten using [fully custom args](https://storybook.js.org/docs/essentials/controls#fully-custom-args): ```jsx export const Reflow = ({ count, label, ...args }) => ( @@ -147,7 +147,7 @@ Basic.args = { }; ``` -The `argTypes` annotation (which can also be applied to individual stories if needed), gives Storybook the hints it needs to generate controls in these unsupported cases. See [control annotations](https://storybook.js.org/docs/react/essentials/controls#annotation) for a full list of control types. +The `argTypes` annotation (which can also be applied to individual stories if needed), gives Storybook the hints it needs to generate controls in these unsupported cases. See [control annotations](https://storybook.js.org/docs/essentials/controls#annotation) for a full list of control types. It's also possible that your Storybook is misconfigured. If you think this might be the case, please search through Storybook's [Github issues](https://github.com/storybookjs/storybook/issues), and file a new issue if you don't find one that matches your use case. diff --git a/code/addons/docs/docs/props-tables.md b/code/addons/docs/docs/props-tables.md index 7a44a6c653ae..6cb5029b00a6 100644 --- a/code/addons/docs/docs/props-tables.md +++ b/code/addons/docs/docs/props-tables.md @@ -82,7 +82,7 @@ export const WithControls = (args) => ; ``` -For a very detailed walkthrough of how to write stories that use controls, read the [documentation](https://storybook.js.org/docs/react/essentials/controls). +For a very detailed walkthrough of how to write stories that use controls, read the [documentation](https://storybook.js.org/docs/essentials/controls). ## Customization @@ -187,7 +187,7 @@ This would render a row with a modified description, a type display with a dropd > - `type: 'number'` is shorthand for `type: { name: 'number' }` > - `control: 'radio'` is shorthand for `control: { type: 'radio' }` -Controls customization has an entire section in the [documentation](https://storybook.js.org/docs/react/essentials/controls#configuration). +Controls customization has an entire section in the [documentation](https://storybook.js.org/docs/essentials/controls#configuration). Here are the possible customizations for the rest of the prop table: @@ -200,7 +200,7 @@ Here are the possible customizations for the rest of the prop table: | `table.type.detail` | A longer version of the type (if it's a complex type) | | `table.defaultValue.summary` | A short version of the default value | | `table.defaultValue.detail` | A longer version of the default value (if it's a complex value) | -| `control` | See [`addon-controls` README](https://storybook.js.org/docs/react/essentials/controls#configuration) | +| `control` | See [`addon-controls` README](https://storybook.js.org/docs/essentials/controls#configuration) | ## Reporting a bug diff --git a/code/addons/toolbars/README.md b/code/addons/toolbars/README.md index dcb9b9c4deef..2e37dc6c6168 100644 --- a/code/addons/toolbars/README.md +++ b/code/addons/toolbars/README.md @@ -28,7 +28,7 @@ export default { ## Usage -The usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/toolbars-and-globals). +The usage is documented in the [documentation](https://storybook.js.org/docs/essentials/toolbars-and-globals). ## FAQs @@ -40,6 +40,6 @@ The primary difference between the two packages is that `addon-toolbars` makes u - **Standardization**. Args are built into Storybook in 6.x. Since `addon-toolbars` is based on args, you don't need to learn any addon-specific APIs to use it. -- **Ergonomics**. Global args are easy to consume [in stories](https://storybook.js.org/docs/react/essentials/toolbars-and-globals#consuming-globals-from-within-a-story), in [Storybook Docs](https://github.com/storybookjs/storybook/tree/next/code/addons/docs), or even in other addons. +- **Ergonomics**. Global args are easy to consume [in stories](https://storybook.js.org/docs/essentials/toolbars-and-globals#consuming-globals-from-within-a-story), in [Storybook Docs](https://github.com/storybookjs/storybook/tree/next/code/addons/docs), or even in other addons. * **Framework compatibility**. Args are completely framework-independent, so `addon-toolbars` is compatible with React, Vue 3, Angular, etc. out of the box with no framework logic needed in the addon. diff --git a/code/addons/viewport/README.md b/code/addons/viewport/README.md index 7975688745fd..6444f180db9f 100644 --- a/code/addons/viewport/README.md +++ b/code/addons/viewport/README.md @@ -26,4 +26,4 @@ You should now be able to see the viewport addon icon in the toolbar at the top ## Usage -The usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/viewport). +The usage is documented in the [documentation](https://storybook.js.org/docs/essentials/viewport). diff --git a/code/core/src/preview-api/modules/store/inferArgTypes.ts b/code/core/src/preview-api/modules/store/inferArgTypes.ts index 007b4971a173..35e840fedcd8 100644 --- a/code/core/src/preview-api/modules/store/inferArgTypes.ts +++ b/code/core/src/preview-api/modules/store/inferArgTypes.ts @@ -25,8 +25,8 @@ const inferType = (value: any, name: string, visited: Set): SBType => { We've detected a cycle in arg '${name}'. Args should be JSON-serializable. Consider using the mapping feature or fully custom args: - - Mapping: https://storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values - - Custom args: https://storybook.js.org/docs/react/essentials/controls#fully-custom-args + - Mapping: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values + - Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args `); return { name: 'other', value: 'cyclic object' }; } diff --git a/code/lib/blocks/src/blocks/Canvas.stories.tsx b/code/lib/blocks/src/blocks/Canvas.stories.tsx index 4a7e25f6706d..bdedf650e534 100644 --- a/code/lib/blocks/src/blocks/Canvas.stories.tsx +++ b/code/lib/blocks/src/blocks/Canvas.stories.tsx @@ -94,7 +94,7 @@ export const PropAdditionalActions: Story = { title: 'Go to documentation', onClick: () => { window.open( - 'https://storybook.js.org/docs/react/essentials/controls#annotation', + 'https://storybook.js.org/docs/essentials/controls#annotation', '_blank' ); }, diff --git a/code/lib/blocks/src/components/ArgsTable/ArgControl.tsx b/code/lib/blocks/src/components/ArgsTable/ArgControl.tsx index 36e75aa81d36..e90609eb51c2 100644 --- a/code/lib/blocks/src/components/ArgsTable/ArgControl.tsx +++ b/code/lib/blocks/src/components/ArgsTable/ArgControl.tsx @@ -72,7 +72,7 @@ export const ArgControl: FC = ({ row, arg, updateArgs, isHovere const canBeSetup = control?.disable !== true && row?.type?.name !== 'function'; return isHovered && canBeSetup ? ( diff --git a/code/lib/blocks/src/examples/CanvasParameters.stories.tsx b/code/lib/blocks/src/examples/CanvasParameters.stories.tsx index aa9affefbfec..6f0c3cb3484c 100644 --- a/code/lib/blocks/src/examples/CanvasParameters.stories.tsx +++ b/code/lib/blocks/src/examples/CanvasParameters.stories.tsx @@ -31,7 +31,7 @@ export const AdditionalActions: Story = { title: 'Go to documentation', onClick: () => { window.open( - 'https://storybook.js.org/docs/react/essentials/controls#annotation', + 'https://storybook.js.org/docs/essentials/controls#annotation', '_blank' ); }, diff --git a/code/lib/test/src/testing-library.ts b/code/lib/test/src/testing-library.ts index 1aa814dafdce..4ff01e47eacf 100644 --- a/code/lib/test/src/testing-library.ts +++ b/code/lib/test/src/testing-library.ts @@ -28,7 +28,7 @@ testingLibrary.screen = new Proxy(testingLibrary.screen, { get(target, prop, receiver) { once.warn(dedent` You are using Testing Library's \`screen\` object. Use \`within(canvasElement)\` instead. - More info: https://storybook.js.org/docs/react/essentials/interactions + More info: https://storybook.js.org/docs/essentials/interactions `); return Reflect.get(target, prop, receiver); },