Skip to content

Commit 4cb6900

Browse files
authored
Revert "Revert storybook version bump and clean up (#6791)"
This reverts commit 98cfb4d.
1 parent 98cfb4d commit 4cb6900

File tree

4 files changed

+718
-1214
lines changed

4 files changed

+718
-1214
lines changed

.changeset/green-trees-beam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Bump storybook versions and clean up main.js

polaris-react/.storybook/main.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,13 @@ const path = require('path');
22
const spawn = require('child_process').spawn;
33
const CreateFileWebpack = require('create-file-webpack');
44
const postcssPlugins = require('../config/postcss-plugins');
5-
// Enabling docs means the preview panel takes an extra 2ish seconds to load
6-
// This usually isn't a big deal, except when we're running all of our stories
7-
// through our a11y tests, and a 2s delay over several hundred stories adds up.
8-
// This is an escape hatch to disable docs only wheile we're running a11y tests
9-
const enableDocs = !parseInt(process.env.STORYBOOK_DISABLE_DOCS || '0', 10);
105

116
module.exports = {
127
core: {
138
builder: 'webpack5',
149
},
15-
// Added to work around https://github.com/storybookjs/storybook/issues/15336
16-
// The line below can be removed in @storybook/react v6.5.0
17-
typescript: {reactDocgen: false},
1810
stories: ['../playground/stories.tsx', '../src/components/**/*/README.md'],
19-
addons: [
20-
{name: '@storybook/addon-essentials', options: {docs: enableDocs}},
21-
'@storybook/addon-a11y',
22-
],
11+
addons: ['@storybook/addon-a11y', '@storybook/addon-toolbars'],
2312
webpackFinal: (config) => {
2413
const isProduction = config.mode === 'production';
2514

@@ -74,15 +63,6 @@ module.exports = {
7463
},
7564
];
7665

77-
config.plugins.push(
78-
new CreateFileWebpack({
79-
path: './build-internal/storybook/static/services/',
80-
fileName: 'ping.html',
81-
content:
82-
'<!DOCTYPE html><html lang="en"><head></head><body>OK</body></html>',
83-
}),
84-
);
85-
8666
config.module.rules = [
8767
// Strip out existing rules that apply to md files
8868
...config.module.rules.filter(

polaris-react/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@
8383
"@shopify/postcss-plugin": "^5.0.1",
8484
"@shopify/react-testing": "^3.2.4",
8585
"@shopify/storybook-a11y-test": "0.4.3",
86-
"@storybook/addon-a11y": "^6.4.19",
87-
"@storybook/addon-console": "^1.2.3",
88-
"@storybook/addon-essentials": "^6.4.19",
89-
"@storybook/builder-webpack5": "^6.4.19",
90-
"@storybook/manager-webpack5": "^6.4.19",
91-
"@storybook/react": "^6.4.19",
86+
"@storybook/addon-a11y": "^6.5.9",
87+
"@storybook/addon-toolbars": "^6.5.9",
88+
"@storybook/builder-webpack5": "^6.5.9",
89+
"@storybook/manager-webpack5": "^6.5.9",
90+
"@storybook/react": "^6.5.9",
9291
"@types/node": "^16.11.11",
9392
"@types/react": "^17.0.19",
9493
"@types/react-dom": "^17.0.9",

0 commit comments

Comments
 (0)