Skip to content

Conversation

@mihkeleidast
Copy link
Contributor

@mihkeleidast mihkeleidast commented Jun 10, 2025

Closes #23170

What I did

Brings in ComponentDriven/csf#103 to core. This annotation broke with Storybook 9 upgrade again, as I guess the csf module was also brought into core without the fixes.

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-storybook/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 pull request has been released as version 0.0.0-pr-31723-sha-fc6b24f9. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-31723-sha-fc6b24f9
Triggered by @kasperpeulen
Repository mihkeleidast/storybook
Branch feature/fix-csf-subcomponents
Commit fc6b24f9
Datetime Wed Jun 11 08:48:04 UTC 2025 (1749631684)
Workflow run 15580337232

To request a new release of this pull request, mention the @storybookjs/core team.

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=31723

Greptile Summary

Fixed TypeScript typing for subcomponents property in Component Story Format (CSF) to allow subcomponents to use their own independent type definitions rather than inheriting from the parent component.

… own type for subcomponents rather than attempt to inherit from the component
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@nx-cloud
Copy link

nx-cloud bot commented Jun 10, 2025

View your CI Pipeline Execution ↗ for commit fc6b24f.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 30s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-11 08:53:27 UTC

@kasperpeulen kasperpeulen changed the title fix: story ComponentAnnotations['subcomponents'] to correctly use its own type for subcomponents rather than attempt to inherit from the component CSF: story ComponentAnnotations['subcomponents'] to correctly use its own type for subcomponents rather than attempt to inherit from the component Jun 11, 2025
@kasperpeulen kasperpeulen changed the title CSF: story ComponentAnnotations['subcomponents'] to correctly use its own type for subcomponents rather than attempt to inherit from the component CSF: Story ComponentAnnotations['subcomponents'] to correctly use its own type for subcomponents rather than attempt to inherit from the component Jun 12, 2025
@kasperpeulen kasperpeulen merged commit 7429e3c into storybookjs:next Jun 12, 2025
58 of 63 checks passed
@JReinhold JReinhold added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jun 12, 2025
@github-actions github-actions bot mentioned this pull request Jun 12, 2025
14 tasks
@storybook-app-bot
Copy link

Package Benchmarks

Commit: fc6b24f, ran on 12 June 2025 at 07:26:11 UTC

The following packages have significant changes to their size or dependencies:

@storybook/angular

Before After Difference
Dependency count 199 209 🚨 +10 🚨
Self size 189 KB 607 KB 🚨 +418 KB 🚨
Dependency size 29.70 MB 29.79 MB 🚨 +94 KB 🚨
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 216 324 🚨 +108 🚨
Self size 582 KB 235 KB 🎉 -347 KB 🎉
Dependency size 94.67 MB 99.89 MB 🚨 +5.22 MB 🚨
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 185 267 🚨 +82 🚨
Self size 31 KB 31 KB 🚨 +361 B 🚨
Dependency size 78.74 MB 82.77 MB 🚨 +4.03 MB 🚨
Bundle Size Analyzer Link Link

JReinhold pushed a commit that referenced this pull request Jun 12, 2025
…ents

CSF: Story ComponentAnnotations['subcomponents'] to correctly use its own type for subcomponents rather than attempt to inherit from the component
(cherry picked from commit 7429e3c)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jun 12, 2025
@github-actions github-actions bot mentioned this pull request Jun 16, 2025
71 tasks
@ndelangen ndelangen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug ci:normal patch:done Patch/release PRs already cherry-picked to main/release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: subcomponents meta property always invalid with TypeScript Strict mode for React

4 participants