mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
## Summary Pure rename of CLAUDE.md files to AGENTS.md (no content changes). ## Changes | Old Path | New Path | |----------|----------| | `.github/CLAUDE.md` | `.github/AGENTS.md` | | `.storybook/CLAUDE.md` | `.storybook/AGENTS.md` | | `browser_tests/CLAUDE.md` | `browser_tests/AGENTS.md` | | `src/CLAUDE.md` | `src/AGENTS.md` | | `src/components/CLAUDE.md` | `src/components/AGENTS.md` | | `src/lib/litegraph/CLAUDE.md` | `src/lib/litegraph/AGENTS.md` | Root `CLAUDE.md` deleted (content will be merged into `AGENTS.md` in follow-up PR). ## Follow-up A second PR will add glob-based guidance files and consolidate redundancies. --------- Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
56 lines
1.0 KiB
Markdown
56 lines
1.0 KiB
Markdown
---
|
|
globs:
|
|
- '**/*.stories.ts'
|
|
---
|
|
|
|
# Storybook Conventions
|
|
|
|
## File Placement
|
|
|
|
Place `*.stories.ts` files alongside their components:
|
|
```
|
|
src/components/MyComponent/
|
|
├── MyComponent.vue
|
|
└── MyComponent.stories.ts
|
|
```
|
|
|
|
## Story Structure
|
|
|
|
```typescript
|
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
import ComponentName from './ComponentName.vue'
|
|
|
|
const meta: Meta<typeof ComponentName> = {
|
|
title: 'Category/ComponentName',
|
|
component: ComponentName,
|
|
parameters: { layout: 'centered' }
|
|
}
|
|
|
|
export default meta
|
|
type Story = StoryObj<typeof meta>
|
|
|
|
export const Default: Story = {
|
|
args: { /* props */ }
|
|
}
|
|
```
|
|
|
|
## Required Story Variants
|
|
|
|
Include when applicable:
|
|
- **Default** - Minimal props
|
|
- **WithData** - Realistic data
|
|
- **Loading** - Loading state
|
|
- **Error** - Error state
|
|
- **Empty** - No data
|
|
|
|
## Mock Data
|
|
|
|
Use realistic ComfyUI schemas for mocks (node definitions, components).
|
|
|
|
## Running Storybook
|
|
|
|
```bash
|
|
pnpm storybook # Development server
|
|
pnpm build-storybook # Production build
|
|
```
|