Skip to content

Commit

Permalink
Merge pull request #29345 from flexbox/docs/storybook-addons-link
Browse files Browse the repository at this point in the history
Docs: Fix outdated documentation URLs
  • Loading branch information
jonniebigodes authored Oct 14, 2024
2 parents 9d86279 + a088fc0 commit edd29d0
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion code/addons/actions/ADVANCED.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion code/addons/backgrounds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
6 changes: 3 additions & 3 deletions code/addons/controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 }) => (
Expand Down Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions code/addons/docs/docs/props-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const WithControls = (args) => <MyComponent {...args} />;
<ArgsTable story="Controls" />
```

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

Expand Down Expand Up @@ -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:

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions code/addons/toolbars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
2 changes: 1 addition & 1 deletion code/addons/viewport/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
4 changes: 2 additions & 2 deletions code/core/src/preview-api/modules/store/inferArgTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const inferType = (value: any, name: string, visited: Set<any>): 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' };
}
Expand Down
2 changes: 1 addition & 1 deletion code/lib/blocks/src/blocks/Canvas.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/blocks/src/components/ArgsTable/ArgControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const ArgControl: FC<ArgControlProps> = ({ row, arg, updateArgs, isHovere
const canBeSetup = control?.disable !== true && row?.type?.name !== 'function';
return isHovered && canBeSetup ? (
<Link
href="https://storybook.js.org/docs/react/essentials/controls"
href="https://storybook.js.org/docs/essentials/controls"
target="_blank"
withArrow
>
Expand Down
2 changes: 1 addition & 1 deletion code/lib/blocks/src/examples/CanvasParameters.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/test/src/testing-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down

0 comments on commit edd29d0

Please sign in to comment.