From d08c408ccc568324cfe89a913ea0c90c8ec21f80 Mon Sep 17 00:00:00 2001 From: snomiao Date: Tue, 30 Sep 2025 02:37:58 +0000 Subject: [PATCH] chore: Remove incomplete story files causing import errors --- .../content/SettingDialogContent.stories.ts | 108 -------- .../content/setting/SettingGroup.stories.ts | 150 ----------- .../content/setting/SettingItem.stories.ts | 159 ------------ .../content/setting/SettingsPanel.stories.ts | 238 ------------------ 4 files changed, 655 deletions(-) delete mode 100644 src/components/dialog/content/SettingDialogContent.stories.ts delete mode 100644 src/components/dialog/content/setting/SettingGroup.stories.ts delete mode 100644 src/components/dialog/content/setting/SettingItem.stories.ts delete mode 100644 src/components/dialog/content/setting/SettingsPanel.stories.ts diff --git a/src/components/dialog/content/SettingDialogContent.stories.ts b/src/components/dialog/content/SettingDialogContent.stories.ts deleted file mode 100644 index fe4d13804..000000000 --- a/src/components/dialog/content/SettingDialogContent.stories.ts +++ /dev/null @@ -1,108 +0,0 @@ -import type { Meta, StoryObj } from '@storybook/vue3-vite' - -import SettingDialogContent from './SettingDialogContent.vue' - -const meta: Meta = { - title: 'Components/Dialog/SettingDialogContent', - component: SettingDialogContent, - parameters: { - layout: 'fullscreen', - docs: { - description: { - component: - 'The complete settings dialog content with sidebar navigation and tabbed panels.' - } - } - }, - argTypes: { - defaultPanel: { - control: 'select', - options: [ - 'about', - 'keybinding', - 'extension', - 'server-config', - 'user', - 'credits' - ], - description: 'The default panel to show when the dialog opens' - } - }, - decorators: [ - () => ({ - template: - '
' - }) - ] -} - -export default meta -type Story = StoryObj - -export const Default: Story = { - args: {} -} - -export const AboutPanel: Story = { - args: { - defaultPanel: 'about' - } -} - -export const KeybindingPanel: Story = { - args: { - defaultPanel: 'keybinding' - } -} - -export const ExtensionPanel: Story = { - args: { - defaultPanel: 'extension' - } -} - -export const ServerConfigPanel: Story = { - args: { - defaultPanel: 'server-config' - } -} - -export const UserPanel: Story = { - args: { - defaultPanel: 'user' - } -} - -export const CreditsPanel: Story = { - args: { - defaultPanel: 'credits' - } -} - -// Responsive variants -export const Mobile: Story = { - args: {}, - parameters: { - viewport: { - defaultViewport: 'mobile1' - } - } -} - -export const Tablet: Story = { - args: {}, - parameters: { - viewport: { - defaultViewport: 'tablet' - } - } -} - -export const Desktop: Story = { - args: {}, - parameters: { - viewport: { - defaultViewport: 'desktop' - } - } -} diff --git a/src/components/dialog/content/setting/SettingGroup.stories.ts b/src/components/dialog/content/setting/SettingGroup.stories.ts deleted file mode 100644 index a62715d63..000000000 --- a/src/components/dialog/content/setting/SettingGroup.stories.ts +++ /dev/null @@ -1,150 +0,0 @@ -import type { Meta, StoryObj } from '@storybook/vue3-vite' - -import type { SettingParams } from '@/types/settingTypes' - -import SettingGroup from './SettingGroup.vue' - -const meta: Meta = { - title: 'Components/Setting/SettingGroup', - component: SettingGroup, - parameters: { - layout: 'padded' - }, - argTypes: { - group: { - control: 'object', - description: 'The setting group configuration' - }, - divider: { - control: 'boolean', - description: 'Show divider above the group' - } - }, - decorators: [ - () => ({ - template: '
' - }) - ] -} - -export default meta -type Story = StoryObj - -const createMockSetting = ( - overrides: Partial = {} -): SettingParams => ({ - id: 'test.setting' as any, - name: 'Test Setting', - type: 'boolean', - defaultValue: false, - ...overrides -}) - -export const BasicGroup: Story = { - args: { - group: { - label: 'Basic Settings', - settings: [ - createMockSetting({ - id: 'basic.enable' as any, - name: 'Enable Feature', - type: 'boolean', - defaultValue: true, - tooltip: 'Enable or disable this feature' - }), - createMockSetting({ - id: 'basic.name' as any, - name: 'Display Name', - type: 'text', - defaultValue: 'My App', - tooltip: 'The name to display in the title bar' - }) - ] - }, - divider: false - } -} - -export const GroupWithDivider: Story = { - args: { - group: { - label: 'Advanced Settings', - settings: [ - createMockSetting({ - id: 'advanced.debug' as any, - name: 'Debug Mode', - type: 'boolean', - defaultValue: false, - experimental: true, - tooltip: 'Enable debug logging and developer tools' - }), - createMockSetting({ - id: 'advanced.timeout' as any, - name: 'Request Timeout (ms)', - type: 'number', - defaultValue: 5000, - tooltip: 'How long to wait for requests', - attrs: { - min: 1000, - max: 30000, - step: 500 - } - }) - ] - }, - divider: true - } -} - -export const PerformanceGroup: Story = { - args: { - group: { - label: 'Performance', - settings: [ - createMockSetting({ - id: 'perf.threads' as any, - name: 'Worker Threads', - type: 'slider', - defaultValue: 4, - tooltip: 'Number of worker threads to use', - attrs: { - min: 1, - max: 16, - step: 1 - } - }), - createMockSetting({ - id: 'perf.quality' as any, - name: 'Render Quality', - type: 'combo', - defaultValue: 'high', - tooltip: 'Rendering quality level', - options: [ - { text: 'Low', value: 'low' }, - { text: 'Medium', value: 'medium' }, - { text: 'High', value: 'high' }, - { text: 'Ultra', value: 'ultra' } - ] - }), - createMockSetting({ - id: 'perf.vsync' as any, - name: 'V-Sync', - type: 'boolean', - defaultValue: true, - tooltip: 'Enable vertical synchronization' - }) - ] - }, - divider: false - } -} - -export const EmptyGroup: Story = { - args: { - group: { - label: 'Empty Group', - settings: [] - }, - divider: false - } -} diff --git a/src/components/dialog/content/setting/SettingItem.stories.ts b/src/components/dialog/content/setting/SettingItem.stories.ts deleted file mode 100644 index d7fbd5999..000000000 --- a/src/components/dialog/content/setting/SettingItem.stories.ts +++ /dev/null @@ -1,159 +0,0 @@ -import type { Meta, StoryObj } from '@storybook/vue3-vite' - -import type { SettingParams } from '@/types/settingTypes' - -import SettingItem from './SettingItem.vue' - -const meta: Meta = { - title: 'Components/Setting/SettingItem', - component: SettingItem, - parameters: { - layout: 'padded' - }, - argTypes: { - setting: { - control: 'object', - description: 'The setting configuration object' - } - }, - decorators: [ - () => ({ - template: '
' - }) - ] -} - -export default meta -type Story = StoryObj - -const createMockSetting = ( - overrides: Partial = {} -): SettingParams => ({ - id: 'test.setting' as any, - name: 'Test Setting', - type: 'boolean', - defaultValue: false, - tooltip: 'This is a test setting for demonstration purposes', - ...overrides -}) - -export const BooleanSetting: Story = { - args: { - setting: createMockSetting({ - name: 'Enable Feature', - type: 'boolean', - defaultValue: true, - tooltip: 'Toggle this feature on or off' - }) - } -} - -export const TextSetting: Story = { - args: { - setting: createMockSetting({ - name: 'API Endpoint', - type: 'text', - defaultValue: 'https://api.example.com', - tooltip: 'The API endpoint to connect to' - }) - } -} - -export const NumberSetting: Story = { - args: { - setting: createMockSetting({ - name: 'Max Connections', - type: 'number', - defaultValue: 10, - tooltip: 'Maximum number of concurrent connections', - attrs: { - min: 1, - max: 100, - step: 1 - } - }) - } -} - -export const SliderSetting: Story = { - args: { - setting: createMockSetting({ - name: 'Volume Level', - type: 'slider', - defaultValue: 50, - tooltip: 'Adjust the volume level', - attrs: { - min: 0, - max: 100, - step: 5 - } - }) - } -} - -export const ComboSetting: Story = { - args: { - setting: createMockSetting({ - name: 'Theme', - type: 'combo', - defaultValue: 'dark', - tooltip: 'Select your preferred theme', - options: [ - { text: 'Light', value: 'light' }, - { text: 'Dark', value: 'dark' }, - { text: 'Auto', value: 'auto' } - ] - }) - } -} - -export const ColorSetting: Story = { - args: { - setting: createMockSetting({ - name: 'Accent Color', - type: 'color', - defaultValue: '#007bff', - tooltip: 'Choose your accent color' - }) - } -} - -export const ExperimentalSetting: Story = { - args: { - setting: createMockSetting({ - name: 'Experimental Feature', - type: 'boolean', - defaultValue: false, - experimental: true, - tooltip: 'This feature is experimental and may change' - }) - } -} - -export const WithLanguageTag: Story = { - args: { - setting: createMockSetting({ - id: 'Comfy.Locale' as any, - name: 'Language', - type: 'combo', - defaultValue: 'en', - tooltip: 'Select your preferred language', - options: [ - { text: 'English', value: 'en' }, - { text: 'Spanish', value: 'es' }, - { text: 'French', value: 'fr' } - ] - }) - } -} - -export const InteractiveBoolean: Story = { - args: { - setting: createMockSetting({ - name: 'Interactive Boolean', - type: 'boolean', - defaultValue: false, - tooltip: 'Click to toggle this setting' - }) - } -} diff --git a/src/components/dialog/content/setting/SettingsPanel.stories.ts b/src/components/dialog/content/setting/SettingsPanel.stories.ts deleted file mode 100644 index ba164d92e..000000000 --- a/src/components/dialog/content/setting/SettingsPanel.stories.ts +++ /dev/null @@ -1,238 +0,0 @@ -import type { Meta, StoryObj } from '@storybook/vue3-vite' - -import type { ISettingGroup, SettingParams } from '@/types/settingTypes' - -import SettingsPanel from './SettingsPanel.vue' - -const meta: Meta = { - title: 'Components/Setting/SettingsPanel', - component: SettingsPanel, - parameters: { - layout: 'padded' - }, - argTypes: { - settingGroups: { - control: 'object', - description: 'Array of setting groups to display' - } - }, - decorators: [ - () => ({ - template: '
' - }) - ] -} - -export default meta -type Story = StoryObj - -const createMockSetting = ( - overrides: Partial = {} -): SettingParams => ({ - id: 'test.setting' as any, - name: 'Test Setting', - type: 'boolean', - defaultValue: false, - ...overrides -}) - -const mockGeneralSettings: ISettingGroup = { - label: 'General', - settings: [ - createMockSetting({ - id: 'Comfy.Locale' as any, - name: 'Language', - type: 'combo', - defaultValue: 'en', - tooltip: 'Select your preferred language', - options: [ - { text: 'English', value: 'en' }, - { text: 'Spanish', value: 'es' }, - { text: 'French', value: 'fr' }, - { text: 'German', value: 'de' } - ] - }), - createMockSetting({ - id: 'Comfy.AutoSave' as any, - name: 'Auto Save', - type: 'boolean', - defaultValue: true, - tooltip: 'Automatically save your work' - }), - createMockSetting({ - id: 'Comfy.AutoSaveInterval' as any, - name: 'Auto Save Interval (seconds)', - type: 'number', - defaultValue: 30, - tooltip: 'How often to auto save in seconds', - attrs: { - min: 10, - max: 300, - step: 5 - } - }) - ] -} - -const mockAppearanceSettings: ISettingGroup = { - label: 'Appearance', - settings: [ - createMockSetting({ - id: 'Comfy.ColorPalette' as any, - name: 'Color Palette', - type: 'combo', - defaultValue: 'dark', - tooltip: 'Choose your color theme', - options: [ - { text: 'Dark', value: 'dark' }, - { text: 'Light', value: 'light' }, - { text: 'Arc', value: 'arc' }, - { text: 'Nord', value: 'nord' } - ] - }), - createMockSetting({ - id: 'Comfy.AccentColor' as any, - name: 'Accent Color', - type: 'color', - defaultValue: '#007bff', - tooltip: 'Choose your accent color' - }), - createMockSetting({ - id: 'Comfy.NodeOpacity' as any, - name: 'Node Opacity', - type: 'slider', - defaultValue: 80, - tooltip: 'Adjust node transparency', - attrs: { - min: 10, - max: 100, - step: 10 - } - }) - ] -} - -const mockPerformanceSettings: ISettingGroup = { - label: 'Performance', - settings: [ - createMockSetting({ - id: 'Comfy.MaxConcurrentTasks' as any, - name: 'Max Concurrent Tasks', - type: 'number', - defaultValue: 4, - tooltip: 'Maximum number of tasks to run simultaneously', - attrs: { - min: 1, - max: 16 - } - }), - createMockSetting({ - id: 'Comfy.EnableGPUAcceleration' as any, - name: 'GPU Acceleration', - type: 'boolean', - defaultValue: true, - tooltip: 'Enable GPU acceleration for better performance', - experimental: true - }), - createMockSetting({ - id: 'Comfy.CacheSize' as any, - name: 'Cache Size (MB)', - type: 'slider', - defaultValue: 512, - tooltip: 'Amount of memory to use for caching', - attrs: { - min: 128, - max: 2048, - step: 128 - } - }) - ] -} - -export const EmptyPanel: Story = { - args: { - settingGroups: [] - } -} - -export const SingleGroup: Story = { - args: { - settingGroups: [mockGeneralSettings] - } -} - -export const MultipleGroups: Story = { - args: { - settingGroups: [ - mockGeneralSettings, - mockAppearanceSettings, - mockPerformanceSettings - ] - } -} - -export const AppearanceOnly: Story = { - args: { - settingGroups: [mockAppearanceSettings] - } -} - -export const PerformanceOnly: Story = { - args: { - settingGroups: [mockPerformanceSettings] - } -} - -export const MixedInputTypes: Story = { - args: { - settingGroups: [ - { - label: 'Mixed Settings', - settings: [ - createMockSetting({ - id: 'mixed.boolean' as any, - name: 'Boolean Setting', - type: 'boolean', - defaultValue: true - }), - createMockSetting({ - id: 'mixed.text' as any, - name: 'Text Setting', - type: 'text', - defaultValue: 'Default text' - }), - createMockSetting({ - id: 'mixed.number' as any, - name: 'Number Setting', - type: 'number', - defaultValue: 42 - }), - createMockSetting({ - id: 'mixed.slider' as any, - name: 'Slider Setting', - type: 'slider', - defaultValue: 75, - attrs: { min: 0, max: 100 } - }), - createMockSetting({ - id: 'mixed.combo' as any, - name: 'Combo Setting', - type: 'combo', - defaultValue: 'option2', - options: [ - { text: 'Option 1', value: 'option1' }, - { text: 'Option 2', value: 'option2' }, - { text: 'Option 3', value: 'option3' } - ] - }), - createMockSetting({ - id: 'mixed.color' as any, - name: 'Color Setting', - type: 'color', - defaultValue: '#ff6b35' - }) - ] - } - ] - } -}