-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Core: Add missing subtype props #32490
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: Add missing subtype props #32490
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 WalkthroughAdds story test functionality across CSF and UI: introduces story entries with subtype (story/test), parent links, test indexing, rendering, and execution paths. Refactors vitest plugin/manager logic, preview/store extraction, and sidebar/tree rendering. Overhauls tag filtering to include/exclude with presets. Updates templates, docs, E2E/tests, and misc utilities. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Sidebar as Manager Sidebar
participant API as Manager API
participant Preview as Preview Store
participant CSF as CSF Processor
participant Vitest as Vitest Plugin/Runner
User->>Sidebar: Click test node (type=story, subtype=test)
Sidebar->>API: selectStory(storyId:test)
API->>Preview: Render selection
Preview->>CSF: Resolve parent story + child test via getStoryChildren
CSF-->>Preview: Composed story/test (storyId, testName)
Preview->>Vitest: testStory(exportName, story|child, meta, skipTags, storyId, testName)
Vitest->>Vitest: Compose, skip by tags, run()
Vitest-->>Preview: Reports/status
Preview-->>API: Update status
API-->>Sidebar: Reflect test icon/status
sequenceDiagram
autonumber
participant Indexer as StoryIndexGenerator
participant Types as Types/Indexer
participant Manager as Manager Hash
participant UI as Sidebar Tree
Indexer->>Types: Emit entries {type:story, subtype:'story'|'test', parent?}
Note right of Indexer: TEST_FN_TAG tags set on tests
Manager->>Manager: Build hash, attach test children to parent story
UI->>Manager: Fetch prepared index
Manager-->>UI: Entries with subtype, children
UI->>UI: Render icons (story/test), expand/collapse, select
sequenceDiagram
autonumber
participant User
participant Tags as TagsFilter
participant Panel as TagsFilterPanel
participant Hash as Stories Hash Filter
User->>Tags: Open tag filter
Tags->>Panel: Show tags with include/exclude states
User->>Panel: Toggle include/exclude for Tag X
Panel-->>Tags: includedTags/excludedTags updated
Tags->>Hash: Apply filter (include any included AND exclude excluded)
Hash-->>User: Filtered sidebar list
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120+ minutes Poem
Pre-merge checks and finishing touches and finishing touches and finishing touches✅ Passed checks (3 passed)
Comment |
|
View your CI Pipeline Execution ↗ for commit 7913c9d
☁️ Nx Cloud last updated this comment at |
Package BenchmarksCommit: No significant changes detected, all good. 👏 |
ba4758a
into
feature/test-syntax-in-csf-sb10
Closes #
What I did
Added
subtype: 'story'where it was missing in mock/story/test data. This fixes the single story hoisting story.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 PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam 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>Summary by CodeRabbit
New Features
UI
Documentation
Chore