Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Fix outdated documentation URLs #29345

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ? (
Comment on lines 72 to 73
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding a comment explaining the purpose of the 'canBeSetup' check for better code readability.

<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
Loading