-
Notifications
You must be signed in to change notification settings - Fork 502
[feat] Add Storybook configuration and settings panel stories #5034
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
7be97b3
[feat] Add Storybook setup and NodePreview story
snomiao 308b3cd
[feat] Improve Storybook configuration and setup
snomiao 6244caf
[docs] Add comprehensive Storybook documentation
snomiao 2b86f41
[refactor] Remove ts-expect-error comment from Storybook preview
snomiao 88baf87
[bugfix] Fix TypeScript errors in Load3D components and GLTF test
snomiao 799b760
[feat] Add Chromatic GitHub Action for Storybook visual testing
snomiao 1411481
[docs] Add Chromatic documentation to Storybook README
snomiao 1e93567
chore(chromatic.yaml): restrict push branches to main only for better…
snomiao ac37a5e
[feat] Rebase branch onto main and update Storybook configuration
snomiao cd787c5
[bugfix] Fix TypeScript errors in SubgraphNode type checking
snomiao cf4ab95
fix(vite.config.mts): correct path alias for src directory to ensure …
snomiao ceec83b
[feat] Remove bun.lock as it's now ignored
snomiao b2a97ee
[bugfix] Fix Storybook builder require() error by converting main.ts …
snomiao 62747ec
chore(storybook): replace main.mjs with main.ts for improved type saf…
snomiao 205f455
[feat] Optimize Chromatic workflow with automated PR status comments
snomiao a89b9e8
chore(chromatic.yaml): move permissions section inside the chromatic-…
snomiao 74a83fa
[fix] Resolve Vite CJS deprecation warning in Storybook config
snomiao 171d096
fix(chromatic.yaml): change edit-mode from replace to append to prese…
snomiao c877223
[fix] Replace __dirname with process.cwd() in Storybook config
snomiao 26dbbb1
feature: storybook-setting (#5088)
viva-jinyi 945e8e9
[feat] Add Storybook configuration and settings panel stories
snomiao de0130d
[bugfix] Fix TypeScript error in Rectangle.ts - remove invalid generi…
snomiao 8167021
[bugfix] Fix TypeScript error in Rectangle subarray method
snomiao 84ce478
Revert "[bugfix] Fix TypeScript error in Rectangle subarray method"
snomiao 4947da3
Revert "[bugfix] Fix TypeScript error in Rectangle.ts - remove invali…
snomiao f989b05
[auto-fix] Fix TypeScript error in Rectangle.ts - remove generic type…
snomiao 2cc7ae2
[revert] Remove litegraph infrastructure changes unrelated to PR
snomiao 13a6a20
restore rectangle.ts
snomiao b9e0186
[merge] Merge origin/main
snomiao 2c9a1f1
Merge remote-tracking branch 'origin/main' into sno-storybook--settin…
snomiao b388bcc
[feat] Improve Storybook configuration and fix store coupling
snomiao 0f06f75
Merge remote-tracking branch 'origin/main' into sno-storybook--settin…
snomiao 257ca95
Merge remote-tracking branch 'origin/main' into sno-storybook--settin…
snomiao 3b95dac
Merge remote-tracking branch 'origin/main' into sno-storybook--settin…
snomiao 24ce3fa
[fix] Add missing @iconify/tailwind dependency for tests
snomiao 2e2e1aa
Merge origin/main into sno-storybook--settings-panel
snomiao b5e106e
[fix] Replace non-existent toBeOneOf test assertions with standard to…
snomiao 6acb1b2
Merge branch 'main' into sno-storybook--settings-panel
snomiao 3aec59a
Merge branch 'main' into sno-storybook--settings-panel
snomiao e930184
Merge branch 'main' into sno-storybook--settings-panel
snomiao a249d20
fix: Update import path for useSettingStore in Storybook preview
snomiao d08c408
chore: Remove incomplete story files causing import errors
snomiao dc5ab71
Merge branch 'main' into sno-storybook--settings-panel
snomiao 6b08839
Merge branch 'main' into sno-storybook--settings-panel
snomiao af20722
Merge origin/main into sno-storybook--settings-panel
snomiao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[feat] Add Storybook configuration and settings panel stories
- Set up Storybook 9.1.2 with Vue 3, PrimeVue, and Tailwind CSS support - Created comprehensive stories for settings panel components: - SettingItem: Various input types (boolean, text, number, slider, combo, color) - SettingGroup: Grouped settings with dividers and different categories - SettingsPanel: Multiple setting groups and empty states - PanelTemplate: Reusable panel layout with header/footer slots - AboutPanel: System information and project badges - SettingDialogContent: Complete dialog with responsive layouts - Updated TypeScript configuration to include Storybook files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,4 +75,3 @@ vite.config.mts.timestamp-*.mjs | |
|
|
||
| *storybook.log | ||
| storybook-static | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,96 +1,63 @@ | ||
| import type { StorybookConfig } from '@storybook/vue3-vite' | ||
| import vue from '@vitejs/plugin-vue' | ||
| import { FileSystemIconLoader } from 'unplugin-icons/loaders' | ||
| import IconsResolver from 'unplugin-icons/resolver' | ||
| import Icons from 'unplugin-icons/vite' | ||
| import Components from 'unplugin-vue-components/vite' | ||
| import type { InlineConfig } from 'vite' | ||
|
|
||
| const config: StorybookConfig = { | ||
| stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
| addons: ['@storybook/addon-docs'], | ||
| stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
| addons: [ | ||
| '@storybook/addon-docs', | ||
| '@storybook/addon-controls', | ||
| '@storybook/addon-actions', | ||
| '@storybook/addon-viewport', | ||
| '@storybook/addon-backgrounds' | ||
| ], | ||
| framework: { | ||
| name: '@storybook/vue3-vite', | ||
| options: {} | ||
| }, | ||
| async viteFinal(config) { | ||
| // Use dynamic import to avoid CJS deprecation warning | ||
| viteFinal: async (config) => { | ||
| const { mergeConfig } = await import('vite') | ||
|
|
||
| // Filter out any plugins that might generate import maps | ||
| if (config.plugins) { | ||
| config.plugins = config.plugins.filter((plugin: any) => { | ||
| if (plugin && plugin.name && plugin.name.includes('import-map')) { | ||
| return false | ||
| } | ||
| return true | ||
| }) | ||
| } | ||
|
|
||
| return mergeConfig(config, { | ||
| // Replace plugins entirely to avoid inheritance issues | ||
| plugins: [ | ||
| // Only include plugins we explicitly need for Storybook | ||
| vue(), | ||
| Icons({ | ||
| compiler: 'vue3', | ||
| customCollections: { | ||
| comfy: FileSystemIconLoader( | ||
| process.cwd() + '/src/assets/icons/custom' | ||
| ) | ||
| comfy: FileSystemIconLoader('../src/assets/icons/custom') | ||
| } | ||
| }), | ||
| Components({ | ||
| dts: false, // Disable dts generation in Storybook | ||
| dts: false, // Disable DTS generation for Storybook | ||
| resolvers: [ | ||
| IconsResolver({ | ||
| customCollections: ['comfy'] | ||
| }) | ||
| ], | ||
| dirs: [ | ||
| process.cwd() + '/src/components', | ||
| process.cwd() + '/src/layout', | ||
| process.cwd() + '/src/views' | ||
| ], | ||
| dirs: ['../src/components', '../src/layout', '../src/views'], | ||
| deep: true, | ||
| extensions: ['vue'] | ||
| }) | ||
| // Note: Explicitly NOT including generateImportMapPlugin to avoid externalization | ||
| ], | ||
| server: { | ||
| allowedHosts: true | ||
| }, | ||
| resolve: { | ||
| alias: { | ||
| '@': process.cwd() + '/src' | ||
| '@': new URL('../src', import.meta.url).pathname | ||
| } | ||
| }, | ||
| build: { | ||
| rollupOptions: { | ||
| external: () => { | ||
| // Don't externalize any modules in Storybook build | ||
| // This ensures PrimeVue and other dependencies are bundled | ||
| return false | ||
| }, | ||
| onwarn: (warning, warn) => { | ||
| // Suppress specific warnings | ||
| if ( | ||
| warning.code === 'UNUSED_EXTERNAL_IMPORT' && | ||
| warning.message?.includes('resolveComponent') | ||
| ) { | ||
| return | ||
| } | ||
| // Suppress Storybook font asset warnings | ||
| if ( | ||
| warning.code === 'UNRESOLVED_IMPORT' && | ||
| warning.message?.includes('nunito-sans') | ||
| ) { | ||
| return | ||
| } | ||
| warn(warning) | ||
| } | ||
| }, | ||
| chunkSizeWarningLimit: 1000 | ||
| define: { | ||
| ...config.define, | ||
| global: 'globalThis', | ||
| __COMFYUI_FRONTEND_VERSION__: JSON.stringify('1.26.4'), | ||
| __SENTRY_ENABLED__: JSON.stringify(false), | ||
| __SENTRY_DSN__: JSON.stringify(''), | ||
| __ALGOLIA_APP_ID__: JSON.stringify(''), | ||
| __ALGOLIA_API_KEY__: JSON.stringify(''), | ||
| __USE_PROD_CONFIG__: JSON.stringify(false) | ||
| } | ||
| } satisfies InlineConfig) | ||
| }) | ||
| } | ||
| } | ||
| export default config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.