Skip to content

Commit 9e7114a

Browse files
Fixed workflow build
1 parent 77cad41 commit 9e7114a

File tree

4 files changed

+38
-16
lines changed

4 files changed

+38
-16
lines changed

.github/workflows/deploy-storybook.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ jobs:
3434
- name: Build Storybook (includes Stencil build)
3535
run: yarn run storybook-build
3636

37+
- name: Verify iframe.html exists
38+
run: |
39+
if [ ! -f "./storybook-static/iframe.html" ]; then
40+
echo "❌ Error: iframe.html missing - Storybook build failed"
41+
echo "This indicates the @stencil/storybook-plugin compatibility issue"
42+
echo "Stories will not load without iframe.html"
43+
ls -la ./storybook-static/ || true
44+
exit 1
45+
fi
46+
echo "✅ iframe.html found - Storybook build successful"
47+
3748
- name: Configure AWS Credentials
3849
uses: aws-actions/configure-aws-credentials@v4
3950
with:

.storybook/main.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@ const config = {
22
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
33
addons: ['@storybook/addon-links', '@storybook/addon-docs'],
44
framework: {
5-
name: '@stencil/storybook-plugin',
5+
name: '@storybook/web-components-vite',
6+
options: {},
67
},
7-
managerHead: (head) => `
8+
managerHead: (head: string) => `
89
${head}
910
<base href="./" />
1011
`,
11-
previewHead: (head) => `
12+
previewHead: (head: string) => `
1213
${head}
1314
<base href="./" />
1415
`,
16+
typescript: {
17+
check: false,
18+
reactDocgen: 'react-docgen-typescript',
19+
reactDocgenTypescriptOptions: {
20+
shouldExtractLiteralValuesFromEnum: true,
21+
propFilter: (prop: any) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
22+
},
23+
},
1524
};
1625

1726
export default config;

.storybook/preview.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/** @jsx h */
2-
import { h } from '@stencil/core';
3-
import type { Preview } from '@stencil/storybook-plugin';
1+
import type { Preview } from '@storybook/web-components';
2+
import { html } from 'lit';
43

54
import { defineCustomElements } from '../dist/web-components';
65

@@ -11,11 +10,13 @@ import './tailwind.css';
1110
defineCustomElements();
1211

1312
export const decorators: Preview['decorators'] = [
14-
(Story, context) => (
15-
<div data-mvx-theme={`mvx:${context.globals.backgrounds.value}-theme`}>
16-
<Story />
17-
</div>
18-
),
13+
(story, context) => {
14+
return html`
15+
<div data-mvx-theme="mvx:${context.globals.backgrounds.value}-theme">
16+
${story()}
17+
</div>
18+
`;
19+
},
1920
];
2021

2122
export const initialGlobals: Preview['initialGlobals'] = {

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@
101101
"@rollup/plugin-image": "^3.0.3",
102102
"@stencil/sass": "^3.0.12",
103103
"@stencil/store": "2.0.16",
104-
"@stencil/storybook-plugin": "^0.4.2",
105-
"@storybook/addon-docs": "9.1.7",
106-
"@storybook/addon-links": "9.1.7",
104+
"@storybook/addon-docs": "8.4.7",
105+
"@storybook/addon-links": "8.4.7",
106+
"@storybook/web-components-vite": "8.4.7",
107+
"lit": "^3.0.0",
107108
"@tailwindcss/cli": "4.0.17",
108109
"@tailwindcss/postcss": "4.1.3",
109110
"@types/jest": "^29.5.14",
@@ -114,7 +115,7 @@
114115
"@typescript-eslint/parser": "^8.23.0",
115116
"eslint": "^9.19.0",
116117
"eslint-plugin-simple-import-sort": "^12.1.1",
117-
"eslint-plugin-storybook": "9.1.7",
118+
"eslint-plugin-storybook": "0.10.2",
118119
"globals": "^15.14.0",
119120
"jest": "^29.7.0",
120121
"jest-cli": "^29.7.0",
@@ -124,7 +125,7 @@
124125
"rollup-plugin-node-polyfills": "^0.2.1",
125126
"sass-embedded": "^1.85.1",
126127
"stencil-tailwind-plugin": "2.0.5",
127-
"storybook": "^9.1.7",
128+
"storybook": "^8.4.7",
128129
"tailwindcss": "4.0.15",
129130
"tsc-alias": "^1.8.16",
130131
"typescript": "^5.7.3",

0 commit comments

Comments
 (0)