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: Remove references to the storiesOf API #25963

Merged
merged 7 commits into from
Feb 19, 2024

Conversation

jonniebigodes
Copy link
Contributor

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:

  • Removed the storiesOf.md from the repo and unlinked it
  • Adjusted the remaining references to factor in the change, either by unlinking them, or rewording.

@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:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/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>

@jonniebigodes jonniebigodes added documentation ci:docs Run the CI jobs for documentation checks only. labels Feb 8, 2024
@jonniebigodes jonniebigodes self-assigned this Feb 8, 2024
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).
Copy link
Contributor

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:

Suggested change
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).

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@jonniebigodes
Copy link
Contributor Author

@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.

Comment on lines 1 to 3
# `@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.
Copy link
Member

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

@jonniebigodes jonniebigodes merged commit 9f0865d into next Feb 19, 2024
18 checks passed
@jonniebigodes jonniebigodes deleted the docs_stories_of_removal branch February 19, 2024 15:01
@github-actions github-actions bot mentioned this pull request Feb 19, 2024
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:docs Run the CI jobs for documentation checks only. documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants