-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Core: Fix built-in tags filtering #32526
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
Core: Fix built-in tags filtering #32526
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughIntroduces Story.test support and test sub-entries across CSF, indexing, manager/store APIs, vitest integration, and UI. Adds subtype fields (story/test), toTestId, getStoryChildren, and TEST_FN_TAG. Updates transformers, sorting, summarization, and filtering. Adjusts Storybook configs, templates, e2e tests, and various mocks/snapshots. Removes legacy tocbot exposure. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant SB as Storybook (CSF)
participant Index as Story Index Generator
participant Manager as Manager UI
participant Vitest as Vitest Runner
Dev->>SB: Define Story S and S.test("Name", fn/annotations, fn)
SB-->>SB: Create child test stories via getStoryChildren + toTestId
SB->>Index: Emit entries {type: 'story', subtype: 'story'|'test', parent?}
Index-->>Manager: Prepared index with stories and tests
Manager->>Manager: Render Sidebar nodes (story/test), filters apply TEST_FN_TAG
Dev->>Vitest: Trigger run (global/story/test)
Vitest->>Index: fetchStories(requestedIds?)
Vitest->>Vitest: Build regex via getTestName / DOUBLE_SPACES
Vitest-->>Dev: Execute matching tests (composeStory.run(testName))
Note over Manager,Vitest: Test selection deep-link uses id: "storyId:testName"
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
|
View your CI Pipeline Execution ↗ for commit a25c124
☁️ Nx Cloud last updated this comment at |
Package BenchmarksCommit: No significant changes detected, all good. 👏 |
e8c84f1 to
f0ce3fe
Compare
2f19c9d
into
feature/test-syntax-in-csf-sb10
Closes #
What I did
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:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake 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 pull request has been released as version
0.0.0-pr-32526-sha-8a835923. Try it out in a new sandbox by runningnpx [email protected] sandboxor in an existing project withnpx [email protected] upgrade.More information
0.0.0-pr-32526-sha-8a835923fix-built-in-tags-filtering8a8359231758622888)To request a new release of this pull request, mention the
@storybookjs/coreteam.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=32526Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Tests
Documentation