Skip to content
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

CLI: Don't add @storybook/addon-links by default #29177

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion code/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ const config: StorybookConfig = {
// },
],
addons: [
'@storybook/addon-links',
'@storybook/addon-themes',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
Expand Down
3 changes: 1 addition & 2 deletions code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "8.4.0-alpha.0",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"addon",
"storybook",
"storybook-addons",
"organize"
],
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/addons/links",
Expand Down
1 change: 0 additions & 1 deletion code/core/src/core-server/__for-testing__/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const config: StorybookConfig = {
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-storysource',
'@storybook/addon-links',
'@storybook/addon-jest',
'@storybook/addon-a11y',
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const config = {
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions'],
framework: {
name: '@storybook/angular',
options: {},
Expand Down
6 changes: 1 addition & 5 deletions code/lib/create-storybook/src/generators/baseGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,7 @@ export async function baseGenerator(
})
: extraAddonPackages;

extraAddonsToInstall.push(
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook@^1'
);
extraAddonsToInstall.push('@storybook/addon-essentials', '@chromatic-com/storybook@^1');

// added to main.js
const addons = [
Expand Down
2 changes: 0 additions & 2 deletions code/lib/create-storybook/src/generators/configure.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ describe('configureMain', () => {
language: SupportedLanguage.JAVASCRIPT,
prefixes: [],
addons: [
"%%path.dirname(require.resolve(path.join('@storybook/addon-links', 'package.json')))%%",
"%%path.dirname(require.resolve(path.join('@storybook/addon-essentials', 'package.json')))%%",
"%%path.dirname(require.resolve(path.join('@storybook/preset-create-react-app', 'package.json')))%%",
"%%path.dirname(require.resolve(path.join('@storybook/addon-interactions', 'package.json')))%%",
Expand All @@ -103,7 +102,6 @@ describe('configureMain', () => {
const config = {
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
path.dirname(require.resolve(path.join('@storybook/addon-links', 'package.json'))),
path.dirname(require.resolve(path.join('@storybook/addon-essentials', 'package.json'))),
path.dirname(require.resolve(path.join('@storybook/preset-create-react-app', 'package.json'))),
path.dirname(require.resolve(path.join('@storybook/addon-interactions', 'package.json'))),
Expand Down
15 changes: 2 additions & 13 deletions docs/_snippets/main-config-test-disable-disableaddons.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ export default {
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-a11y'],
build: {
test: {
disabledAddons: ['@storybook/addon-a11y'],
Expand All @@ -24,12 +19,7 @@ import type { StorybookConfig } from '@storybook/your-framework';
const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
],
addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-a11y'],
build: {
test: {
disabledAddons: ['@storybook/addon-a11y'],
Expand All @@ -39,4 +29,3 @@ const config: StorybookConfig = {

export default config;
```

3 changes: 0 additions & 3 deletions docs/_snippets/storybook-coverage-addon-optimized-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export default {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-coverage',
Expand All @@ -25,7 +24,6 @@ const config: StorybookConfig = {
framework: '@storybook/your-framework',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-coverage',
Expand All @@ -39,4 +37,3 @@ const config: StorybookConfig = {

export default config;
```

3 changes: 1 addition & 2 deletions docs/_snippets/storybook-vite-builder-aliasing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```js filename=".storybook/main.js|ts" renderer="common" language="js"
export default {
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
addons: ['@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite',
},
Expand All @@ -18,4 +18,3 @@ export default {
},
};
```

3 changes: 1 addition & 2 deletions docs/_snippets/storybook-vite-builder-react-docgen.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```js filename=".storybook/main.js|ts" renderer="common" language="js"
export default {
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
addons: ['@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite',
},
Expand All @@ -12,4 +12,3 @@ export default {
},
};
```

3 changes: 1 addition & 2 deletions docs/_snippets/storybook-vite-builder-register.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
```js filename=".storybook/main.js|ts" renderer="common" language="js"
export default {
stories: ['../src/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
addons: ['@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite', // 👈 The builder enabled here.
},
};
```

1 change: 0 additions & 1 deletion docs/api/cli-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ Storybook Environment Info:
npmPackages:
@storybook/addon-essentials: ^7.6.6 => 7.6.6
@storybook/addon-interactions: ^7.6.6 => 7.6.6
@storybook/addon-links: ^7.6.6 => 7.6.6
@storybook/addon-onboarding: ^1.0.10 => 1.0.10
@storybook/blocks: ^7.6.6 => 7.6.6
@storybook/preset-create-react-app: ^7.6.6 => 7.6.6
Expand Down
3 changes: 0 additions & 3 deletions docs/configure/telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ Will generate the following output:
}
},
"addons": {
"@storybook/addon-links": {
"version": "7.1.0"
},
"@storybook/addon-essentials": {
"version": "7.1.0"
},
Expand Down
Loading