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 MDX Stories block tag-filtering behavior #27144

Merged
merged 1 commit into from
May 15, 2024

Conversation

shilman
Copy link
Member

@shilman shilman commented May 15, 2024

Closes #27143

What I did

Made a sneaky change to the tag-based filtering of autodocs introduced in 8.1, which was an unintentional breaking change for users who used the Stories doc block in MDX pages.

Now if NONE of the stories have the autodocs tag (which is only possible in an MDX page), it will show ALL of the stories in the Stories block.

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

You can check the added stories:

You can also reproduce this in a sandbox by adding Button.mdx and playing around with the tags in Button.stories.ts:

import { Meta, Stories } from '@storybook/blocks'
import * as ButtonStories from './Button.stories'

<Meta of={ButtonStories} />

# Button stories

<Stories />

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

Copy link

nx-cloud bot commented May 15, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit babad72. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@shilman shilman requested a review from JReinhold May 15, 2024 09:25
@shilman shilman changed the title Docs: Fix Stories block tag-filtering behavior in MDX Docs: Fix MDX Stories block tag-filtering behavior May 15, 2024
@shilman shilman merged commit ce3d0d5 into next May 15, 2024
62 of 63 checks passed
@shilman shilman deleted the shilman/27143-fix-stories-block-in-mdx branch May 15, 2024 09:35
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label May 15, 2024
storybook-bot pushed a commit that referenced this pull request May 15, 2024
…block-in-mdx

Docs: Fix MDX Stories block tag-filtering behavior
(cherry picked from commit ce3d0d5)
storybook-bot pushed a commit that referenced this pull request May 15, 2024
…block-in-mdx

Docs: Fix MDX Stories block tag-filtering behavior
(cherry picked from commit ce3d0d5)
storybook-bot pushed a commit that referenced this pull request May 15, 2024
…block-in-mdx

Docs: Fix MDX Stories block tag-filtering behavior
(cherry picked from commit ce3d0d5)
@github-actions github-actions bot mentioned this pull request May 15, 2024
9 tasks
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: other bug ci:normal patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stories doc block in mdx broken in 8.1.0
2 participants