From c63bfd6b06bc334b05f0d1bdc5a6c8ec38534664 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 24 Mar 2025 13:52:31 +0100 Subject: [PATCH] Remove addon-interactions --- CODEOWNERS | 1 - code/.storybook/main.ts | 8 - code/addons/interactions/README.md | 55 --- code/addons/interactions/manager.js | 1 - code/addons/interactions/package.json | 107 ---- code/addons/interactions/preset.js | 1 - code/addons/interactions/preview.js | 1 - code/addons/interactions/project.json | 8 - code/addons/interactions/src/Panel.test.ts | 292 ----------- code/addons/interactions/src/Panel.tsx | 262 ---------- .../src/components/EmptyState.tsx | 70 --- .../src/components/Interaction.stories.tsx | 65 --- .../src/components/Interaction.tsx | 208 -------- .../components/InteractionsPanel.stories.tsx | 137 ------ .../src/components/InteractionsPanel.tsx | 175 ------- .../interactions/src/components/List.tsx | 93 ---- .../src/components/MatcherResult.stories.tsx | 112 ----- .../src/components/MatcherResult.tsx | 146 ------ .../src/components/MethodCall.stories.tsx | 219 --------- .../src/components/MethodCall.tsx | 465 ------------------ .../src/components/StatusBadge.stories.tsx | 25 - .../src/components/StatusBadge.tsx | 45 -- .../src/components/StatusIcon.stories.tsx | 24 - .../src/components/StatusIcon.tsx | 46 -- .../src/components/Subnav.stories.tsx | 91 ---- .../interactions/src/components/Subnav.tsx | 194 -------- code/addons/interactions/src/constants.ts | 5 - code/addons/interactions/src/index.ts | 5 - code/addons/interactions/src/manager.tsx | 47 -- code/addons/interactions/src/mocks/index.ts | 148 ------ code/addons/interactions/src/preset.ts | 2 - code/addons/interactions/src/preview.ts | 21 - code/addons/interactions/src/theme.ts | 20 - code/addons/interactions/src/types.ts | 14 - code/addons/interactions/src/utils.ts | 39 -- .../template/stories/basics.stories.ts | 135 ----- .../stories/unhandled-errors.stories.ts | 27 - code/addons/interactions/tsconfig.json | 7 - code/addons/interactions/vitest.config.ts | 10 - code/addons/test/src/postinstall.ts | 36 -- code/addons/test/src/preset.ts | 21 - code/builders/builder-vite/README.md | 2 +- .../builders/builder-vite/src/optimizeDeps.ts | 1 - .../js-package-manager/NPMProxy.test.ts | 23 - .../js-package-manager/PNPMProxy.test.ts | 8 +- .../js-package-manager/Yarn1Proxy.test.ts | 4 +- code/core/src/common/presets.test.ts | 14 +- .../utils/__tests__/check-addon-order.test.ts | 18 +- code/core/src/common/versions.ts | 1 - .../src/core-server/__for-testing__/main.ts | 1 - code/core/src/instrumenter/instrumenter.ts | 2 +- .../components/sidebar/Heading.stories.tsx | 1 - .../components/sidebar/Tree.stories.tsx | 1 - .../modules/store/csf/stepRunners.ts | 4 +- code/core/src/test/README.md | 2 +- code/e2e-tests/addon-interactions.spec.ts | 13 +- code/e2e-tests/addon-test.spec.ts | 5 - code/lib/cli-storybook/src/add.ts | 4 +- .../__test__/main-config-with-wrappers.js | 6 +- .../__test__/main-config-without-wrappers.js | 2 +- .../src/generators/baseGenerator.ts | 5 - .../src/generators/configure.test.ts | 2 - code/package.json | 1 - code/sandbox/angular-cli-15-ts/project.json | 1 - .../angular-cli-default-ts/project.json | 1 - .../angular-cli-prerelease/project.json | 1 - .../project.json | 1 - .../project.json | 1 - .../bench-react-vite-default-ts/project.json | 1 - .../project.json | 1 - .../bench-react-webpack-18-ts/project.json | 1 - code/sandbox/cra-default-js/project.json | 1 - code/sandbox/cra-default-ts/project.json | 1 - code/sandbox/ember-3-js/project.json | 1 - code/sandbox/ember-default-js/project.json | 1 - .../project.json | 1 - .../sandbox/html-vite-default-js/project.json | 1 - .../sandbox/html-vite-default-ts/project.json | 1 - .../sandbox/html-webpack-default/project.json | 1 - .../internal-react16-webpack/project.json | 1 - .../project.json | 1 - .../internal-server-webpack5/project.json | 1 - code/sandbox/lit-vite-default-js/project.json | 1 - code/sandbox/lit-vite-default-ts/project.json | 1 - code/sandbox/nextjs-default-js/project.json | 1 - code/sandbox/nextjs-default-ts/project.json | 1 - code/sandbox/nextjs-prerelease/project.json | 1 - .../sandbox/nuxt-vite-default-ts/project.json | 1 - .../preact-vite-default-js/project.json | 1 - .../preact-vite-default-ts/project.json | 1 - .../sandbox/qwik-vite-default-ts/project.json | 1 - .../react-vite-default-js/project.json | 1 - .../react-vite-default-ts/project.json | 1 - code/sandbox/react-webpack-17-ts/project.json | 1 - code/sandbox/react-webpack-18-ts/project.json | 1 - .../solid-vite-default-js/project.json | 1 - .../solid-vite-default-ts/project.json | 1 - .../svelte-kit-prerelease-ts/project.json | 1 - .../svelte-kit-skeleton-js/project.json | 1 - .../svelte-kit-skeleton-ts/project.json | 1 - .../svelte-vite-default-js/project.json | 1 - .../svelte-vite-default-ts/project.json | 1 - code/sandbox/vue-cli-default-js/project.json | 1 - .../sandbox/vue3-vite-default-js/project.json | 1 - .../sandbox/vue3-vite-default-ts/project.json | 1 - code/yarn.lock | 21 - test-storybooks/ember-cli/package.json | 1 - test-storybooks/external-docs/package.json | 1 - .../nextjs/.storybook/main.ts | 1 - .../nextjs/jest.setup.ts | 4 - .../nextjs/package.json | 2 - .../react/cypress/support/component.ts | 2 - .../react/jest.setup.ts | 5 +- .../react/package.json | 2 - .../react/playwright/index.ts | 9 +- .../svelte/.storybook/main.ts | 1 - .../svelte/cypress/support/component.ts | 2 - .../svelte/package.json | 2 - .../svelte/playwright/index.ts | 5 +- .../vue3/.storybook/main.ts | 1 - .../vue3/cypress/support/component.ts | 2 - .../vue3/package.json | 2 - .../vue3/playwright/index.ts | 5 +- .../server-kitchen-sink/package.json | 1 - .../standalone-preview/package.json | 1 - 125 files changed, 27 insertions(+), 3593 deletions(-) delete mode 100644 code/addons/interactions/README.md delete mode 100644 code/addons/interactions/manager.js delete mode 100644 code/addons/interactions/package.json delete mode 100644 code/addons/interactions/preset.js delete mode 100644 code/addons/interactions/preview.js delete mode 100644 code/addons/interactions/project.json delete mode 100644 code/addons/interactions/src/Panel.test.ts delete mode 100644 code/addons/interactions/src/Panel.tsx delete mode 100644 code/addons/interactions/src/components/EmptyState.tsx delete mode 100644 code/addons/interactions/src/components/Interaction.stories.tsx delete mode 100644 code/addons/interactions/src/components/Interaction.tsx delete mode 100644 code/addons/interactions/src/components/InteractionsPanel.stories.tsx delete mode 100644 code/addons/interactions/src/components/InteractionsPanel.tsx delete mode 100644 code/addons/interactions/src/components/List.tsx delete mode 100644 code/addons/interactions/src/components/MatcherResult.stories.tsx delete mode 100644 code/addons/interactions/src/components/MatcherResult.tsx delete mode 100644 code/addons/interactions/src/components/MethodCall.stories.tsx delete mode 100644 code/addons/interactions/src/components/MethodCall.tsx delete mode 100644 code/addons/interactions/src/components/StatusBadge.stories.tsx delete mode 100644 code/addons/interactions/src/components/StatusBadge.tsx delete mode 100644 code/addons/interactions/src/components/StatusIcon.stories.tsx delete mode 100644 code/addons/interactions/src/components/StatusIcon.tsx delete mode 100644 code/addons/interactions/src/components/Subnav.stories.tsx delete mode 100644 code/addons/interactions/src/components/Subnav.tsx delete mode 100644 code/addons/interactions/src/constants.ts delete mode 100644 code/addons/interactions/src/index.ts delete mode 100644 code/addons/interactions/src/manager.tsx delete mode 100644 code/addons/interactions/src/mocks/index.ts delete mode 100644 code/addons/interactions/src/preset.ts delete mode 100644 code/addons/interactions/src/preview.ts delete mode 100644 code/addons/interactions/src/theme.ts delete mode 100644 code/addons/interactions/src/types.ts delete mode 100644 code/addons/interactions/src/utils.ts delete mode 100644 code/addons/interactions/template/stories/basics.stories.ts delete mode 100644 code/addons/interactions/template/stories/unhandled-errors.stories.ts delete mode 100644 code/addons/interactions/tsconfig.json delete mode 100644 code/addons/interactions/vitest.config.ts diff --git a/CODEOWNERS b/CODEOWNERS index 7c7aee5e09e..f051c38c804 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -21,7 +21,6 @@ # /code/addons/essentials/ @valentinpalkovic @ndelangen # /code/addons/gfm/ @ndelangen @valentinpalkovic # /code/addons/highlight/ @yannbf @valentinpalkovic -# /code/addons/interactions/ @yannbf @ndelangen # /code/addons/jest/ @ndelangen # /code/addons/links/ @yannbf @JReinhold # /code/addons/measure/ @yannbf @valentinpalkovic diff --git a/code/.storybook/main.ts b/code/.storybook/main.ts index f32112ae798..d1a4ff6ebc5 100644 --- a/code/.storybook/main.ts +++ b/code/.storybook/main.ts @@ -73,14 +73,6 @@ const config = defineMain({ directory: '../addons/onboarding/src', titlePrefix: 'addons/onboarding', }, - { - directory: '../addons/interactions/src', - titlePrefix: 'addons/interactions', - }, - { - directory: '../addons/interactions/template/stories', - titlePrefix: 'addons/interactions/tests', - }, { directory: '../addons/test/src/components', titlePrefix: 'addons/test', diff --git a/code/addons/interactions/README.md b/code/addons/interactions/README.md deleted file mode 100644 index 26192c246a8..00000000000 --- a/code/addons/interactions/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Storybook Addon Interactions - -Storybook Addon Interactions enables visual debugging of interactions and tests in [Storybook](https://storybook.js.org). - -![Screenshot](https://user-images.githubusercontent.com/321738/135628189-3d101cba-50bc-49dc-bba0-776586fedaf3.png) - -## Installation - -Install this addon by adding the `@storybook/addon-interactions` dependency: - -```sh -yarn add -D @storybook/addon-interactions -``` - -within `.storybook/main.js`: - -```js -export default { - addons: ['@storybook/addon-interactions'], -}; -``` - -## Usage - -Interactions relies on "instrumented" versions of Vitest and Testing Library, that you import from `storybook/test` instead of their original package. You can then use these libraries in your `play` function. - -```js -import { expect, fn, userEvent, within } from 'storybook/test'; -import { Button } from './Button'; - -export default { - title: 'Button', - component: Button, - args: { - onClick: fn(), - }, -}; - -const Template = (args) =>