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

Revert Storybook Version Upgrade to Fix Custom Component Devmode #9893

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions .changeset/tasty-buckets-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/preview": patch
"@self/storybook": patch
---

fix:Revert Storybook Version Upgrade to Fix Custom Component Devmode
2 changes: 1 addition & 1 deletion js/preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"sucrase": "^3.34.0",
"sugarss": "^4.0.1",
"svelte-hmr": "^0.16.0",
"svelte-preprocess": "^6.0.3",
"svelte-preprocess": "^5.0.4",
"typescript": "^5.0.0",
"vite": "^5.2.9",
"which": "4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion js/storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const config: StorybookConfig = {
name: "@storybook/svelte-vite",
options: {
builder: {
viteConfigPath: "js/storybook/vite.config.js"
viteConfigPath: "vite.config.js"
}
}
},
Expand Down
21 changes: 20 additions & 1 deletion js/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,24 @@
"type": "module",
"author": "",
"license": "ISC",
"private": true
"private": true,
"scripts": {
"storybook": "storybook dev -p 6006 --config-dir .",
"build-storybook": "storybook build --config-dir . --webpack-stats-json"
},
"dependencies": {
"@storybook/addon-a11y": "^8.3.6",
"@storybook/addon-essentials": "^8.3.6",
"@storybook/addon-interactions": "^8.3.6",
"@storybook/addon-links": "^8.3.6",
"@storybook/addon-svelte-csf": "^4.1.7",
"@storybook/blocks": "^8.3.6",
"@storybook/manager-api": "^8.3.6",
"@storybook/svelte": "^8.3.6",
"@storybook/svelte-vite": "^8.3.6",
"@storybook/test": "^8.3.6",
"@storybook/theming": "^8.3.6",
"svelte-preprocess": "^6.0.3",
"svelte": "^4.2.15"
}
}
13 changes: 10 additions & 3 deletions js/storybook/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { sveltePreprocess } from "svelte-preprocess";
import sveltePreprocess from "svelte-preprocess";
import autoprefixer from "autoprefixer";
import { inject_component_loader } from "../build/out/index.js";

Expand All @@ -11,7 +11,6 @@ export default defineConfig({
allow: [".."]
}
},

plugins: [
svelte({
inspector: false,
Expand All @@ -29,5 +28,13 @@ export default defineConfig({
],
resolve: {
conditions: ["gradio"]
}
},
build: {
rollupOptions: {
external: ["@storybook/svelte"]
}
},
optimizeDeps: {
include: ['@storybook/svelte']
}
});
19 changes: 2 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"test:browser:full": "run-s build test:browser",
"test:browser:verbose": "pnpm test:browser",
"test:browser:dev": "pnpm --filter @self/spa test:browser:dev",
"storybook": "storybook dev -p 6006 --config-dir js/storybook",
"build-storybook": "storybook build --config-dir js/storybook --webpack-stats-json",
"storybook": "pnpm --filter @self/storybook storybook",
"build-storybook": "pnpm --filter @self/storybook build-storybook",
"ci:version": "changeset version && pnpm i --lockfile-only && node ./.changeset/fix_changelogs.cjs",
"ci:publish": "pnpm changeset tag && git push origin --tags && pnpm publish --no-git-checks --access public -r --filter=@gradio/*",
"chromatic": "chromatic",
Expand Down Expand Up @@ -84,7 +84,6 @@
"svelte-check": "^4.0.5",
"svelte-eslint-parser": "^0.36.0",
"svelte-i18n": "^4.0.0",
"svelte-preprocess": "^6.0.3",
"tailwindcss": "^3.4.3",
"tinyspy": "^3.0.0",
"typescript": "^5.5.4",
Expand Down Expand Up @@ -147,17 +146,6 @@
"@gradio/upload": "workspace:^",
"@gradio/uploadbutton": "workspace:^",
"@gradio/video": "workspace:^",
"@storybook/addon-a11y": "^8.3.6",
"@storybook/addon-essentials": "^8.3.6",
"@storybook/addon-interactions": "^8.3.6",
"@storybook/addon-links": "^8.3.6",
"@storybook/addon-svelte-csf": "^4.1.7",
"@storybook/blocks": "^8.3.6",
"@storybook/manager-api": "^8.3.6",
"@storybook/svelte": "^8.3.6",
"@storybook/svelte-vite": "^8.3.6",
"@storybook/test": "^8.3.6",
"@storybook/theming": "^8.3.6",
"@testing-library/user-event": "^14.5.2",
"chromatic": "^11.3.0",
"eslint-plugin-jsdoc": "^48.2.3",
Expand All @@ -172,9 +160,6 @@
"patchedDependencies": {
"@sveltejs/[email protected]": "patches/@[email protected]",
"@ffmpeg/[email protected]": "patches/@[email protected]"
},
"overrides": {
"svelte-preprocess": "^6.0.3"
}
}
}
Loading
Loading