Skip to content

Addons: Move @storybook/addon-interactions into core #30916

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

Merged
merged 18 commits into from
Mar 26, 2025

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Mar 24, 2025

Closes N/A

What I did

This PR implements a significant architectural change in Storybook's testing infrastructure by consolidating the interactions testing functionality from the standalone @storybook/addon-interactions into the core component testing module. This change aims to streamline the testing experience and reduce fragmentation in the codebase.
Key Changes

1. Addon Consolidation

  • Removed the standalone @storybook/addon-interactions package
  • Moved all interactions-related components and functionality to core/component-testing
  • Updated imports and references across the codebase to reflect the new structure

2. Component Migration

The following components were moved from addons/interactions to core/component-testing:

  • Interaction.tsx
  • InteractionsPanel.tsx
  • List.tsx
  • MatcherResult.tsx
  • MethodCall.tsx
  • Panel.tsx
  • StatusBadge.tsx
  • StatusIcon.tsx
  • Subnav.tsx
  • TestDiscrepancyMessage.tsx

3. Configuration Updates

  • Removed interactions-specific configurations from various project files
  • Updated package.json files to remove @storybook/addon-interactions dependencies
  • Simplified Storybook configuration files by removing interactions-specific settings
  • Updated build and test configurations to reflect the new structure

4. Dependencies Removed from @storybook/addon-test

  • @storybook/addon-interactions
  • formik
  • @devtools-ds/object-inspector
  • ansi-to-html
  • strip-ansi

Notes

  • This change is part of a larger effort to streamline Storybook's testing infrastructure
  • The consolidation aims to improve maintainability and reduce confusion about which testing approach to use
  • Future improvements to the component testing module will be more straightforward with this unified approach

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-30916-sha-e160c7e2. Try it out in a new sandbox by running npx storybook@0.0.0-pr-30916-sha-e160c7e2 sandbox or in an existing project with npx storybook@0.0.0-pr-30916-sha-e160c7e2 upgrade.

More information
Published version 0.0.0-pr-30916-sha-e160c7e2
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/remove-addon-interactions-2
Commit e160c7e2
Datetime Tue Mar 25 12:53:51 UTC 2025 (1742907231)
Workflow run 14060105573

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

Greptile Summary

Here's a concise summary of this significant architectural change to Storybook's testing infrastructure:

This PR consolidates the interactions testing functionality from @storybook/addon-interactions into the core component testing module, streamlining Storybook's testing infrastructure.

Key changes:

  • Moved all interactions components and utilities from addon-interactions to core/component-testing
  • Removed standalone @storybook/addon-interactions package and its dependencies
  • Updated imports across codebase to reference new core module locations
  • Added new component-testing manager and preview entries in core configuration
  • Removed addon-interactions from all sandbox and test project configurations

The changes appear well-structured and maintain existing functionality while reducing codebase fragmentation. However, careful testing is needed to ensure all interaction testing capabilities work properly after consolidation.

Copy link
Contributor

github-actions bot commented Mar 24, 2025

Fails
🚫 PR is marked with "BREAKING CHANGE" label.

Generated by 🚫 dangerJS against 5911cae

@valentinpalkovic valentinpalkovic force-pushed the valentin/remove-addon-interactions-2 branch from d095390 to 6c3ec54 Compare March 24, 2025 16:16
@valentinpalkovic valentinpalkovic changed the title Addons: Move @storybook/addon-interactionsinto core Addons: Move @storybook/addon-interactions into core Mar 24, 2025
Copy link

nx-cloud bot commented Mar 24, 2025

View your CI Pipeline Execution ↗ for commit 5911cae.

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

☁️ Nx Cloud last updated this comment at 2025-03-26 07:27:09 UTC

@valentinpalkovic valentinpalkovic force-pushed the valentin/remove-addon-interactions-2 branch from 6c3ec54 to 19e48fe Compare March 24, 2025 16:34
@valentinpalkovic valentinpalkovic marked this pull request as ready for review March 24, 2025 23:23
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.

168 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile

@valentinpalkovic valentinpalkovic merged commit 49cc119 into next Mar 26, 2025
53 of 54 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/remove-addon-interactions-2 branch March 26, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy