-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: Remove references to the storiesOf API #25963
Conversation
docs/faq.md
Outdated
<Callout variant="info"> | ||
|
||
With the release of version 5.3, we've updated how you can write your stories more compactly and easily. It doesn't mean that the `storiesOf` format has been removed. For the time being, we're still supporting it, and we have documentation for it. But be advised that this is bound to change in the future. | ||
If you have stories written with the older `storiesOf` format, it was removed in Storybook 8.0 and is no longer maintained. We recommend that you migrate your stories to CSF. See the [migration guide](./migration-guide.md#storiesof-to-csf) for more information. However, if you need, you can still access the old documentation for `storiesOf` [here](https://github.com/storybookjs/storybook/blob/release/5.3/docs/src/pages/formats/storiesof-api/index.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Let's avoid links that use only "here" for their text:
If you have stories written with the older `storiesOf` format, it was removed in Storybook 8.0 and is no longer maintained. We recommend that you migrate your stories to CSF. See the [migration guide](./migration-guide.md#storiesof-to-csf) for more information. However, if you need, you can still access the old documentation for `storiesOf` [here](https://github.com/storybookjs/storybook/blob/release/5.3/docs/src/pages/formats/storiesof-api/index.md). | |
If you have stories written with the older `storiesOf` format, it was removed in Storybook 8.0 and is no longer maintained. We recommend that you migrate your stories to CSF. See the [migration guide](./migration-guide.md#storiesof-to-csf) for more information. However, if you need, you can still access the [old documentation for `storiesOf`](https://github.com/storybookjs/storybook/blob/release/5.3/docs/src/pages/formats/storiesof-api/index.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fail to see your point on this. We have it across the documentation, and it's not incorrect. Let me know and we'll go from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, I don't think it's a blocker. Second, it's an accessibility thing. Users of assistive technology (like screen readers) can pull up a list of all the links on a page. When they do so, they need the link text to be descriptive, so they can know what to expect when they activate that link. That's especially true when the URL is ungainly as it is here (nothing we can do about that). When the link text is just "here", that provides zero information about what that link is pointing to.
@ndelangen appreciate you following up with me on this. I've just removed the item based on your feedback. When you have a moment, can you take another pass and let me know of any other feedback you may have so that we can address it and get this one merged in when possible? Thanks in advance. |
# `@storybook/client-api` -- Removed Story APIs (`storiesOf`) | ||
|
||
**NOTE** This API is deprecated, and the CSF format is preferred for all stories. | ||
|
||
## `storiesOf` API | ||
|
||
The `@storybook/client` API provides the [`storiesOf()` API](./docs/storiesOf.md), which is proxied through to the CSF API. | ||
|
||
### Internals | ||
|
||
In order to appear to the store like the CSF API, a call to `storiesOf().add()` does the following: | ||
|
||
- Tracks the story added in a synthetic `StoryIndex` data structure | ||
- Constructs a `moduleExports` object that is equivalent to the exports from a CSF file that produced the same stories. | ||
|
||
In order to achieve the old `storySort` functionality, the client API also needs access to the project annotations. | ||
**NOTE** This API is deprecated, and the CSF format is preferred for all stories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can delete this file
Follows up on the following discussion
What I did
With this pull request, the last remnants of the
storiesOf
API are getting removed from the documentation that we currently have as it's no longer supported in the upcoming release.What was done:
storiesOf.md
from the repo and unlinked it@JReinhold and @ndelangen, when both of you have a moment, can you follow up with me with any feedback you may have? Thanks in advance,.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/core
team here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>