2232 lines
65 KiB
Markdown
2232 lines
65 KiB
Markdown
|
|
# 📚 VEZA STORYBOOK - AUDIT COMPLET
|
||
|
|
|
||
|
|
**Date de l'audit**: 2 Février 2026
|
||
|
|
**Version Storybook**: 8.6.15
|
||
|
|
**Framework**: React + Vite
|
||
|
|
**Auteur**: Antigravity AI Assistant
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 📋 TABLE DES MATIÈRES
|
||
|
|
|
||
|
|
1. [Résumé Exécutif](#résumé-exécutif)
|
||
|
|
2. [Métriques de Couverture](#métriques-de-couverture)
|
||
|
|
3. [Configuration Storybook](#configuration-storybook)
|
||
|
|
4. [Inventaire Complet des Stories](#inventaire-complet-des-stories)
|
||
|
|
5. [Analyse par Catégorie](#analyse-par-catégorie)
|
||
|
|
6. [Composants Sans Stories](#composants-sans-stories)
|
||
|
|
7. [Qualité des Stories](#qualité-des-stories)
|
||
|
|
8. [Recommandations](#recommandations)
|
||
|
|
9. [Plan d'Action Prioritaire](#plan-daction-prioritaire)
|
||
|
|
10. [Annexes](#annexes)
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 1. RÉSUMÉ EXÉCUTIF
|
||
|
|
|
||
|
|
## Vue d'Ensemble
|
||
|
|
|
||
|
|
Le Storybook de Veza est un outil de documentation UI complet qui couvre actuellement **42%** des composants de l'application. Cette couverture représente un bon point de départ mais nécessite une expansion significative pour atteindre les objectifs de documentation complète.
|
||
|
|
|
||
|
|
### Statistiques Clés
|
||
|
|
|
||
|
|
| Métrique | Valeur |
|
||
|
|
|----------|--------|
|
||
|
|
| **Fichiers de Stories** | 164 |
|
||
|
|
| **Composants Totaux** | 384 |
|
||
|
|
| **Couverture Globale** | 42% |
|
||
|
|
| **Lignes de Code (Stories)** | 8,300 |
|
||
|
|
| **Lignes de Code (Config)** | 152 |
|
||
|
|
| **Variants par Story (Moyenne)** | ~3.5 |
|
||
|
|
|
||
|
|
### Points Forts ✅
|
||
|
|
|
||
|
|
- Configuration moderne avec Storybook 8.6.15
|
||
|
|
- Addons essentiels configurés (a11y, interactions)
|
||
|
|
- Decorators globaux pour QueryClient, Toast, Router
|
||
|
|
- Viewports personnalisés pour tests responsive
|
||
|
|
- Documentation MDX avec page d'accueil
|
||
|
|
|
||
|
|
### Points à Améliorer ⚠️
|
||
|
|
|
||
|
|
- 11 features sans aucune story
|
||
|
|
- Absence de tests d'interaction (play functions)
|
||
|
|
- Pas d'argTypes définis dans les stories
|
||
|
|
- Views/Pages non documentées (20 composants)
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 2. MÉTRIQUES DE COUVERTURE
|
||
|
|
|
||
|
|
## 2.1 Couverture Globale
|
||
|
|
|
||
|
|
```
|
||
|
|
📊 Storybook Coverage Analysis
|
||
|
|
==============================
|
||
|
|
|
||
|
|
📁 Total Components: 384
|
||
|
|
📖 Total Stories: 164
|
||
|
|
📈 Coverage: 42%
|
||
|
|
```
|
||
|
|
|
||
|
|
## 2.2 Couverture par Type
|
||
|
|
|
||
|
|
| Type | Stories | Composants | Couverture |
|
||
|
|
|------|---------|------------|------------|
|
||
|
|
| **Components** | 86 | 236 | 36% |
|
||
|
|
| **Features** | 78 | 136 | 57% |
|
||
|
|
| **Pages/Views** | 0 | ~25 | 0% |
|
||
|
|
|
||
|
|
## 2.3 Couverture par Répertoire Components
|
||
|
|
|
||
|
|
| Répertoire | Stories | Composants | Manquants | Couverture |
|
||
|
|
|------------|---------|------------|-----------|------------|
|
||
|
|
| ui | 47 | 51 | 4 | **92%** |
|
||
|
|
| dashboard | 3 | 3 | 0 | **100%** |
|
||
|
|
| live | 2 | 2 | 0 | **100%** |
|
||
|
|
| notifications | 3 | 3 | 0 | **100%** |
|
||
|
|
| modals | 1 | 1 | 0 | **100%** |
|
||
|
|
| education | 4 | 6 | 2 | 67% |
|
||
|
|
| layout | 4 | 6 | 2 | 67% |
|
||
|
|
| social | 5 | 11 | 6 | 45% |
|
||
|
|
| studio | 3 | 8 | 5 | 38% |
|
||
|
|
| seller | 2 | 3 | 1 | 67% |
|
||
|
|
| search | 2 | 3 | 1 | 67% |
|
||
|
|
| navigation | 2 | 3 | 1 | 67% |
|
||
|
|
| inventory | 2 | 4 | 2 | 50% |
|
||
|
|
| filters | 1 | 3 | 2 | 33% |
|
||
|
|
| feedback | 2 | 5 | 3 | 40% |
|
||
|
|
| theme | 1 | 2 | 1 | 50% |
|
||
|
|
| admin | 0 | 7 | 7 | **0%** |
|
||
|
|
| analytics | 0 | 1 | 1 | **0%** |
|
||
|
|
| auth | 0 | 1 | 1 | **0%** |
|
||
|
|
| base | 0 | 4 | 4 | **0%** |
|
||
|
|
| charts | 0 | 4 | 4 | **0%** |
|
||
|
|
| commerce | 0 | 5 | 5 | **0%** |
|
||
|
|
| data | 0 | 4 | 4 | **0%** |
|
||
|
|
| demo | 0 | 1 | 1 | **0%** |
|
||
|
|
| developer | 0 | 5 | 5 | **0%** |
|
||
|
|
| forms | 0 | 4 | 4 | **0%** |
|
||
|
|
| gamification | 0 | 5 | 5 | **0%** |
|
||
|
|
| keyboard | 0 | 1 | 1 | **0%** |
|
||
|
|
| library | 0 | 9 | 9 | **0%** |
|
||
|
|
| marketplace | 0 | 5 | 5 | **0%** |
|
||
|
|
| monitoring | 0 | 1 | 1 | **0%** |
|
||
|
|
| player | 0 | 8 | 8 | **0%** |
|
||
|
|
| pwa | 0 | 1 | 1 | **0%** |
|
||
|
|
| settings | 0 | 18 | 18 | **0%** |
|
||
|
|
| share | 0 | 1 | 1 | **0%** |
|
||
|
|
| upload | 0 | 9 | 9 | **0%** |
|
||
|
|
| user | 0 | 1 | 1 | **0%** |
|
||
|
|
| views | 0 | 20 | 20 | **0%** |
|
||
|
|
|
||
|
|
## 2.4 Couverture par Feature
|
||
|
|
|
||
|
|
| Feature | Stories | Status |
|
||
|
|
|---------|---------|--------|
|
||
|
|
| tracks | 19 | ✅ Excellente |
|
||
|
|
| player | 14 | ✅ Excellente |
|
||
|
|
| playlists | 10 | ✅ Bonne |
|
||
|
|
| auth | 8 | ✅ Bonne |
|
||
|
|
| settings | 8 | ✅ Bonne |
|
||
|
|
| chat | 7 | ✅ Bonne |
|
||
|
|
| streaming | 4 | ⚠️ Partielle |
|
||
|
|
| roles | 3 | ⚠️ Partielle |
|
||
|
|
| library | 2 | ⚠️ Partielle |
|
||
|
|
| marketplace | 2 | ⚠️ Partielle |
|
||
|
|
| profile | 1 | ❌ Minimale |
|
||
|
|
| admin | 0 | ❌ Absente |
|
||
|
|
| analytics | 0 | ❌ Absente |
|
||
|
|
| dashboard | 0 | ❌ Absente |
|
||
|
|
| error | 0 | ❌ Absente |
|
||
|
|
| notifications | 0 | ❌ Absente |
|
||
|
|
| search | 0 | ❌ Absente |
|
||
|
|
| sessions | 0 | ❌ Absente |
|
||
|
|
| stream | 0 | ❌ Absente |
|
||
|
|
| upload | 0 | ❌ Absente |
|
||
|
|
| user | 0 | ❌ Absente |
|
||
|
|
| webhooks | 0 | ❌ Absente |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 3. CONFIGURATION STORYBOOK
|
||
|
|
|
||
|
|
## 3.1 Fichiers de Configuration
|
||
|
|
|
||
|
|
### `.storybook/main.ts` (30 lignes)
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
import type { StorybookConfig } from '@storybook/react-vite';
|
||
|
|
import { dirname, join } from "path"
|
||
|
|
|
||
|
|
function getAbsolutePath(value: string) {
|
||
|
|
return dirname(require.resolve(join(value, "package.json")))
|
||
|
|
}
|
||
|
|
|
||
|
|
const config: StorybookConfig = {
|
||
|
|
"stories": [
|
||
|
|
"../src/**/*.mdx",
|
||
|
|
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
|
||
|
|
],
|
||
|
|
"addons": [
|
||
|
|
getAbsolutePath('@storybook/addon-essentials'),
|
||
|
|
getAbsolutePath('@storybook/addon-a11y'),
|
||
|
|
getAbsolutePath('@storybook/addon-interactions'),
|
||
|
|
],
|
||
|
|
"framework": getAbsolutePath('@storybook/react-vite'),
|
||
|
|
"docs": {
|
||
|
|
"defaultName": "Documentation"
|
||
|
|
},
|
||
|
|
"typescript": {
|
||
|
|
"reactDocgen": "react-docgen-typescript",
|
||
|
|
"reactDocgenTypescriptOptions": {
|
||
|
|
"shouldExtractLiteralValuesFromEnum": true,
|
||
|
|
"propFilter": (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
};
|
||
|
|
export default config;
|
||
|
|
```
|
||
|
|
|
||
|
|
#### Analyse de la Configuration Main
|
||
|
|
|
||
|
|
| Élément | Valeur | Statut |
|
||
|
|
|---------|--------|--------|
|
||
|
|
| Framework | @storybook/react-vite | ✅ Optimal |
|
||
|
|
| Stories Pattern | `../src/**/*.stories.@(js|jsx|mjs|ts|tsx)` | ✅ Standard |
|
||
|
|
| MDX Support | `../src/**/*.mdx` | ✅ Activé |
|
||
|
|
| TypeScript Docgen | react-docgen-typescript | ✅ Avancé |
|
||
|
|
| Enum Extraction | shouldExtractLiteralValuesFromEnum: true | ✅ Activé |
|
||
|
|
| Node Modules Filter | Activé | ✅ Optimisé |
|
||
|
|
|
||
|
|
### `.storybook/preview.tsx` (95 lignes)
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
import type { Preview } from '@storybook/react-vite';
|
||
|
|
import '../src/index.css';
|
||
|
|
import React from 'react';
|
||
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||
|
|
import { MemoryRouter } from 'react-router-dom';
|
||
|
|
import { ToastProvider } from '../src/components/feedback/ToastProvider';
|
||
|
|
|
||
|
|
// Create a client for stories
|
||
|
|
const queryClient = new QueryClient({
|
||
|
|
defaultOptions: {
|
||
|
|
queries: {
|
||
|
|
retry: false,
|
||
|
|
staleTime: Infinity,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|
||
|
|
|
||
|
|
// Custom viewports for responsive testing
|
||
|
|
const customViewports = {
|
||
|
|
mobile: {
|
||
|
|
name: 'Mobile',
|
||
|
|
styles: {
|
||
|
|
width: '375px',
|
||
|
|
height: '667px',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
tablet: {
|
||
|
|
name: 'Tablet',
|
||
|
|
styles: {
|
||
|
|
width: '768px',
|
||
|
|
height: '1024px',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
desktop: {
|
||
|
|
name: 'Desktop',
|
||
|
|
styles: {
|
||
|
|
width: '1440px',
|
||
|
|
height: '900px',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
const preview: Preview = {
|
||
|
|
parameters: {
|
||
|
|
controls: {
|
||
|
|
matchers: {
|
||
|
|
color: /(background|color)$/i,
|
||
|
|
date: /Date$/i,
|
||
|
|
},
|
||
|
|
expanded: true,
|
||
|
|
},
|
||
|
|
a11y: {
|
||
|
|
test: 'todo',
|
||
|
|
},
|
||
|
|
viewport: {
|
||
|
|
viewports: customViewports,
|
||
|
|
},
|
||
|
|
backgrounds: {
|
||
|
|
default: 'dark',
|
||
|
|
values: [
|
||
|
|
{ name: 'dark', value: '#0a0a0a' },
|
||
|
|
{ name: 'light', value: '#ffffff' },
|
||
|
|
{ name: 'steel', value: '#1a1a2e' },
|
||
|
|
],
|
||
|
|
},
|
||
|
|
layout: 'centered',
|
||
|
|
docs: {
|
||
|
|
toc: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
decorators: [
|
||
|
|
(Story, context) => {
|
||
|
|
const isDark = context.globals.backgrounds?.value !== '#ffffff';
|
||
|
|
return (
|
||
|
|
<div className={isDark ? 'dark' : ''}>
|
||
|
|
<QueryClientProvider client={queryClient}>
|
||
|
|
<ToastProvider>
|
||
|
|
<MemoryRouter>
|
||
|
|
<Story />
|
||
|
|
</MemoryRouter>
|
||
|
|
</ToastProvider>
|
||
|
|
</QueryClientProvider>
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
},
|
||
|
|
],
|
||
|
|
tags: ['autodocs'],
|
||
|
|
};
|
||
|
|
|
||
|
|
export default preview;
|
||
|
|
```
|
||
|
|
|
||
|
|
#### Analyse de la Configuration Preview
|
||
|
|
|
||
|
|
| Fonctionnalité | Configuration | Statut |
|
||
|
|
|----------------|---------------|--------|
|
||
|
|
| **Decorators Globaux** | | |
|
||
|
|
| QueryClientProvider | ✅ Configuré | Optimal |
|
||
|
|
| ToastProvider | ✅ Configuré | Optimal |
|
||
|
|
| MemoryRouter | ✅ Configuré | Optimal |
|
||
|
|
| Theme Class | ✅ Dynamique | Optimal |
|
||
|
|
| **Viewports** | | |
|
||
|
|
| Mobile (375x667) | ✅ Configuré | Standard |
|
||
|
|
| Tablet (768x1024) | ✅ Configuré | Standard |
|
||
|
|
| Desktop (1440x900) | ✅ Configuré | Standard |
|
||
|
|
| **Backgrounds** | | |
|
||
|
|
| Dark (#0a0a0a) | ✅ Default | Correct |
|
||
|
|
| Light (#ffffff) | ✅ Option | Correct |
|
||
|
|
| Steel (#1a1a2e) | ✅ Option | Custom |
|
||
|
|
| **Parameters** | | |
|
||
|
|
| Controls Expanded | ✅ true | Amélioré |
|
||
|
|
| A11y Test | ✅ 'todo' | Configuré |
|
||
|
|
| Layout | ✅ 'centered' | Standard |
|
||
|
|
| Docs TOC | ✅ true | Activé |
|
||
|
|
| Autodocs | ✅ Activé | Auto-génération |
|
||
|
|
|
||
|
|
## 3.2 Addons Installés
|
||
|
|
|
||
|
|
| Addon | Version | Description | Statut |
|
||
|
|
|-------|---------|-------------|--------|
|
||
|
|
| @storybook/addon-essentials | 8.6.15 | Pack d'addons de base | ✅ Actif |
|
||
|
|
| @storybook/addon-a11y | 8.6.15 | Tests d'accessibilité | ✅ Actif |
|
||
|
|
| @storybook/addon-interactions | 8.6.15 | Tests d'interaction | ✅ Actif |
|
||
|
|
| storybook-dark-mode | 4.0.2 | Toggle dark mode | ⚠️ Non configuré |
|
||
|
|
|
||
|
|
### Addons Essentiels Inclus
|
||
|
|
|
||
|
|
- **@storybook/addon-actions**: Capture des events
|
||
|
|
- **@storybook/addon-backgrounds**: Changement de fond
|
||
|
|
- **@storybook/addon-controls**: Props interactifs
|
||
|
|
- **@storybook/addon-docs**: Documentation auto
|
||
|
|
- **@storybook/addon-highlight**: Mise en surbrillance
|
||
|
|
- **@storybook/addon-measure**: Mesures CSS
|
||
|
|
- **@storybook/addon-outline**: Contours d'éléments
|
||
|
|
- **@storybook/addon-toolbars**: Barre d'outils
|
||
|
|
- **@storybook/addon-viewport**: Simulation responsive
|
||
|
|
|
||
|
|
## 3.3 Dépendances Storybook
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"@storybook/addon-a11y": "^8.6.15",
|
||
|
|
"@storybook/addon-essentials": "^8.6.15",
|
||
|
|
"@storybook/addon-interactions": "^8.6.15",
|
||
|
|
"@storybook/builder-vite": "^8.6.15",
|
||
|
|
"@storybook/react-vite": "^8.6.15",
|
||
|
|
"storybook": "^8.6.15",
|
||
|
|
"storybook-dark-mode": "^4.0.2"
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 4. INVENTAIRE COMPLET DES STORIES
|
||
|
|
|
||
|
|
## 4.1 Stories UI Components (47 fichiers)
|
||
|
|
|
||
|
|
### Inputs & Forms
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Lignes |
|
||
|
|
|-----------|---------|----------|--------|
|
||
|
|
| Button | Button.stories.tsx | 6 | ~80 |
|
||
|
|
| Input | Input.stories.tsx | 5 | ~70 |
|
||
|
|
| Textarea | Textarea.stories.tsx | 4 | ~60 |
|
||
|
|
| Checkbox | Checkbox.stories.tsx | 4 | ~50 |
|
||
|
|
| Switch | Switch.stories.tsx | 5 | ~70 |
|
||
|
|
| Select | Select.stories.tsx | 3 | ~80 |
|
||
|
|
| RadioGroup | RadioGroup.stories.tsx | 2 | ~50 |
|
||
|
|
| Slider | Slider.stories.tsx | 4 | ~60 |
|
||
|
|
| DatePicker | DatePicker.stories.tsx | 3 | ~70 |
|
||
|
|
| FileUpload | FileUpload.stories.tsx | 5 | ~90 |
|
||
|
|
| FloatingInput | FloatingInput.stories.tsx | 3 | ~50 |
|
||
|
|
| FormField | FormField.stories.tsx | 4 | ~70 |
|
||
|
|
|
||
|
|
### Feedback & Display
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Lignes |
|
||
|
|
|-----------|---------|----------|--------|
|
||
|
|
| Alert | Alert.stories.tsx | 6 | ~90 |
|
||
|
|
| Toast | Toast.stories.tsx | 4 | ~70 |
|
||
|
|
| Badge | Badge.stories.tsx | 4 | ~60 |
|
||
|
|
| Progress | Progress.stories.tsx | 3 | ~50 |
|
||
|
|
| Spinner | Spinner.stories.tsx | 4 | ~60 |
|
||
|
|
| LoadingSpinner | LoadingSpinner.stories.tsx | 4 | ~55 |
|
||
|
|
| LoadingState | LoadingState.stories.tsx | 4 | ~70 |
|
||
|
|
| Skeleton | Skeleton.stories.tsx | 4 | ~60 |
|
||
|
|
| ErrorDisplay | ErrorDisplay.stories.tsx | 4 | ~80 |
|
||
|
|
| KodoEmptyState | KodoEmptyState.stories.tsx | 3 | ~50 |
|
||
|
|
| Tooltip | Tooltip.stories.tsx | 3 | ~60 |
|
||
|
|
| HelpText | HelpText.stories.tsx | 2 | ~40 |
|
||
|
|
|
||
|
|
### Layout & Navigation
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Lignes |
|
||
|
|
|-----------|---------|----------|--------|
|
||
|
|
| Card | Card.stories.tsx | 3 | ~60 |
|
||
|
|
| Accordion | Accordion.stories.tsx | 2 | ~50 |
|
||
|
|
| Tabs | Tabs.stories.tsx | 1 | ~40 |
|
||
|
|
| Collapsible | Collapsible.stories.tsx | 2 | ~50 |
|
||
|
|
| Dialog | Dialog.stories.tsx | 3 | ~70 |
|
||
|
|
| Modal | Modal.stories.tsx | 2 | ~50 |
|
||
|
|
| DropdownMenu | DropdownMenu.stories.tsx | 3 | ~80 |
|
||
|
|
| ScrollArea | ScrollArea.stories.tsx | 1 | ~40 |
|
||
|
|
| Sidebar | Sidebar.stories.tsx | 2 | ~60 |
|
||
|
|
| Table | Table.stories.tsx | 1 | ~70 |
|
||
|
|
|
||
|
|
### Media & Visual
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Lignes |
|
||
|
|
|-----------|---------|----------|--------|
|
||
|
|
| Avatar | Avatar.stories.tsx | 4 | ~70 |
|
||
|
|
| AvatarUpload | AvatarUpload.stories.tsx | 4 | ~60 |
|
||
|
|
| Label | Label.stories.tsx | 2 | ~35 |
|
||
|
|
| OptimizedImage | OptimizedImage.stories.tsx | 3 | ~55 |
|
||
|
|
| ImageCropper | ImageCropper.stories.tsx | 2 | ~60 |
|
||
|
|
| ImageViewerModal | ImageViewerModal.stories.tsx | 2 | ~50 |
|
||
|
|
| WaveformVisualizer | WaveformVisualizer.stories.tsx | 3 | ~70 |
|
||
|
|
| AstralBackground | AstralBackground.stories.tsx | 1 | ~30 |
|
||
|
|
|
||
|
|
### Interactive
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Lignes |
|
||
|
|
|-----------|---------|----------|--------|
|
||
|
|
| ConfirmationDialog | ConfirmationDialog.stories.tsx | 2 | ~50 |
|
||
|
|
| FAB | FAB.stories.tsx | 4 | ~60 |
|
||
|
|
| FocusTrap | FocusTrap.stories.tsx | 1 | ~40 |
|
||
|
|
| VirtualizedList | VirtualizedList.stories.tsx | 2 | ~60 |
|
||
|
|
| DataList | DataList.stories.tsx | 4 | ~80 |
|
||
|
|
|
||
|
|
## 4.2 Stories Feature Components (78 fichiers)
|
||
|
|
|
||
|
|
### Player Feature (14 stories)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| GlobalPlayer | GlobalPlayer.stories.tsx | 2 | Player principal |
|
||
|
|
| MiniPlayer | MiniPlayer.stories.tsx | 2 | Lecteur compact |
|
||
|
|
| PlayerControls | PlayerControls.stories.tsx | 2 | Contrôles lecture |
|
||
|
|
| PlayerExpanded | PlayerExpanded.stories.tsx | 2 | Vue étendue |
|
||
|
|
| PlayerLoading | PlayerLoading.stories.tsx | 5 | États chargement |
|
||
|
|
| PlayerQueue | PlayerQueue.stories.tsx | 2 | File d'attente |
|
||
|
|
| PlayPauseButton | PlayPauseButton.stories.tsx | 5 | Bouton play/pause |
|
||
|
|
| NextPreviousButtons | NextPreviousButtons.stories.tsx | 4 | Navigation |
|
||
|
|
| RepeatShuffleButtons | RepeatShuffleButtons.stories.tsx | 5 | Modes lecture |
|
||
|
|
| ProgressBar | ProgressBar.stories.tsx | 3 | Barre progression |
|
||
|
|
| TimeDisplay | TimeDisplay.stories.tsx | 4 | Affichage temps |
|
||
|
|
| TrackInfo | TrackInfo.stories.tsx | 6 | Infos piste |
|
||
|
|
| VolumeControl | VolumeControl.stories.tsx | 4 | Contrôle volume |
|
||
|
|
| QualitySelector | QualitySelector.stories.tsx | 2 | Sélection qualité |
|
||
|
|
|
||
|
|
### Tracks Feature (19 stories)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| TrackList | TrackList.stories.tsx | 7 | Liste de pistes |
|
||
|
|
| TrackListRow | TrackListRow.stories.tsx | 5 | Ligne de piste |
|
||
|
|
| TrackListEmpty | TrackListEmpty.stories.tsx | 4 | État vide |
|
||
|
|
| TrackListSkeleton | TrackListSkeleton.stories.tsx | 2 | Squelette |
|
||
|
|
| TrackListPagination | TrackListPagination.stories.tsx | 5 | Pagination |
|
||
|
|
| TrackListSelectionActions | TrackListSelectionActions.stories.tsx | 3 | Actions sélection |
|
||
|
|
| TrackCard | TrackCard.stories.tsx | 3 | Carte piste |
|
||
|
|
| TrackGrid | TrackGrid.stories.tsx | 4 | Grille pistes |
|
||
|
|
| TrackGridDensitySelector | TrackGridDensitySelector.stories.tsx | 4 | Densité grille |
|
||
|
|
| TrackFilters | TrackFilters.stories.tsx | 2 | Filtres |
|
||
|
|
| TrackSort | TrackSort.stories.tsx | 2 | Tri |
|
||
|
|
| TrackHistory | TrackHistory.stories.tsx | 2 | Historique |
|
||
|
|
| TrackStatsDisplay | TrackStatsDisplay.stories.tsx | 2 | Statistiques |
|
||
|
|
| ViewToggle | ViewToggle.stories.tsx | 2 | Toggle vue |
|
||
|
|
| UploadQuota | UploadQuota.stories.tsx | 3 | Quota upload |
|
||
|
|
| CommentSection | CommentSection.stories.tsx | 2 | Section commentaires |
|
||
|
|
| CommentThread | CommentThread.stories.tsx | 4 | Fil commentaires |
|
||
|
|
| LikeButton | LikeButton.stories.tsx | 2 | Bouton like |
|
||
|
|
| ShareDialog | ShareDialog.stories.tsx | 2 | Dialog partage |
|
||
|
|
|
||
|
|
### Playlists Feature (10 stories)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| PlaylistCard | PlaylistCard.stories.tsx | 4 | Carte playlist |
|
||
|
|
| PlaylistHeader | PlaylistHeader.stories.tsx | 2 | En-tête |
|
||
|
|
| PlaylistForm | PlaylistForm.stories.tsx | 2 | Formulaire |
|
||
|
|
| PlaylistActions | PlaylistActions.stories.tsx | 2 | Actions |
|
||
|
|
| PlaylistAnalytics | PlaylistAnalytics.stories.tsx | 1 | Analytics |
|
||
|
|
| PlaylistFollowButton | PlaylistFollowButton.stories.tsx | 2 | Bouton follow |
|
||
|
|
| ExportPlaylistButton | ExportPlaylistButton.stories.tsx | 1 | Export |
|
||
|
|
| CreatePlaylistDialog | CreatePlaylistDialog.stories.tsx | 1 | Création |
|
||
|
|
| AddTrackToPlaylistModal | AddTrackToPlaylistModal.stories.tsx | 1 | Ajout piste |
|
||
|
|
| CollaboratorManagement | CollaboratorManagement.stories.tsx | 2 | Collaborateurs |
|
||
|
|
|
||
|
|
### Auth Feature (8 stories)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| AuthButton | AuthButton.stories.tsx | 4 | Bouton auth |
|
||
|
|
| AuthInput | AuthInput.stories.tsx | 3 | Input auth |
|
||
|
|
| AuthLayout | AuthLayout.stories.tsx | 2 | Layout auth |
|
||
|
|
| LoginForm | LoginForm.stories.tsx | 1 | Formulaire login |
|
||
|
|
| RegisterForm | RegisterForm.stories.tsx | 1 | Inscription |
|
||
|
|
| OAuthButtons | OAuthButtons.stories.tsx | 1 | Boutons OAuth |
|
||
|
|
| PasswordStrengthIndicator | PasswordStrengthIndicator.stories.tsx | 5 | Force mot de passe |
|
||
|
|
| UserProfile | UserProfile.stories.tsx | 1 | Profil utilisateur |
|
||
|
|
|
||
|
|
### Settings Feature (8 stories)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| AccountSettings | AccountSettings.stories.tsx | 2 | Paramètres compte |
|
||
|
|
| ContentSettings | ContentSettings.stories.tsx | 1 | Paramètres contenu |
|
||
|
|
| NotificationSettings | NotificationSettings.stories.tsx | 1 | Notifications |
|
||
|
|
| PlaybackSettings | PlaybackSettings.stories.tsx | 1 | Lecture |
|
||
|
|
| PreferenceSettings | PreferenceSettings.stories.tsx | 1 | Préférences |
|
||
|
|
| PrivacySettings | PrivacySettings.stories.tsx | 1 | Confidentialité |
|
||
|
|
| SettingsTabs | SettingsTabs.stories.tsx | 1 | Onglets |
|
||
|
|
| TwoFactorSettings | TwoFactorSettings.stories.tsx | 2 | 2FA |
|
||
|
|
|
||
|
|
### Chat Feature (7 stories)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| ChatInterface | ChatInterface.stories.tsx | 2 | Interface chat |
|
||
|
|
| ChatInput | ChatInput.stories.tsx | 3 | Input message |
|
||
|
|
| ChatMessage | ChatMessage.stories.tsx | 3 | Message |
|
||
|
|
| ChatMessages | ChatMessages.stories.tsx | 2 | Liste messages |
|
||
|
|
| ChatRoom | ChatRoom.stories.tsx | 2 | Salle de chat |
|
||
|
|
| ChatSidebar | ChatSidebar.stories.tsx | 1 | Sidebar |
|
||
|
|
| TypingIndicator | TypingIndicator.stories.tsx | 1 | Indicateur frappe |
|
||
|
|
|
||
|
|
### Streaming Feature (4 stories)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| BitrateSelector | BitrateSelector.stories.tsx | 4 | Sélection bitrate |
|
||
|
|
| PlaybackDashboard | PlaybackDashboard.stories.tsx | 1 | Dashboard |
|
||
|
|
| PlaybackHeatmap | PlaybackHeatmap.stories.tsx | 1 | Carte chaleur |
|
||
|
|
| PlaybackSummary | PlaybackSummary.stories.tsx | 1 | Résumé |
|
||
|
|
|
||
|
|
### Roles Feature (3 stories)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| EditRoleModal | EditRoleModal.stories.tsx | 2 | Édition rôle |
|
||
|
|
| CreateRoleModal | CreateRoleModal.stories.tsx | 1 | Création rôle |
|
||
|
|
| AssignRoleModal | AssignRoleModal.stories.tsx | 1 | Attribution |
|
||
|
|
|
||
|
|
### Other Features
|
||
|
|
|
||
|
|
| Feature | Composant | Variants |
|
||
|
|
|---------|-----------|----------|
|
||
|
|
| Library | LibraryManager | 2 |
|
||
|
|
| Library | UploadModal | 1 |
|
||
|
|
| Marketplace | Cart | 2 |
|
||
|
|
| Marketplace | ProductCard | 2 |
|
||
|
|
| Profile | FollowButton | 2 |
|
||
|
|
|
||
|
|
## 4.3 Stories Layout Components (4 fichiers)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants | Description |
|
||
|
|
|-----------|---------|----------|-------------|
|
||
|
|
| DashboardLayout | DashboardLayout.stories.tsx | 1 | Layout principal |
|
||
|
|
| Header | Header.stories.tsx | 1 | En-tête |
|
||
|
|
| Navbar | Navbar.stories.tsx | 1 | Navigation |
|
||
|
|
| Sidebar | Sidebar.stories.tsx | 2 | Barre latérale |
|
||
|
|
|
||
|
|
## 4.4 Stories Social Components (5 fichiers)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants |
|
||
|
|
|-----------|---------|----------|
|
||
|
|
| CommentItem | CommentItem.stories.tsx | 2 |
|
||
|
|
| PostCard | PostCard.stories.tsx | 3 |
|
||
|
|
| GroupCard | GroupCard.stories.tsx | 2 |
|
||
|
|
| GroupsView | GroupsView.stories.tsx | 2 |
|
||
|
|
| CreateGroupModal | CreateGroupModal.stories.tsx | 1 |
|
||
|
|
|
||
|
|
## 4.5 Stories Navigation Components (2 fichiers)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants |
|
||
|
|
|-----------|---------|----------|
|
||
|
|
| Breadcrumbs | Breadcrumbs.stories.tsx | 4 |
|
||
|
|
| Pagination | Pagination.stories.tsx | 7 |
|
||
|
|
|
||
|
|
## 4.6 Stories Notifications Components (3 fichiers)
|
||
|
|
|
||
|
|
| Composant | Fichier | Variants |
|
||
|
|
|-----------|---------|----------|
|
||
|
|
| NotificationBell | NotificationBell.stories.tsx | 2 |
|
||
|
|
| NotificationItem | NotificationItem.stories.tsx | 3 |
|
||
|
|
| NotificationMenu | NotificationMenu.stories.tsx | 2 |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 5. ANALYSE PAR CATÉGORIE
|
||
|
|
|
||
|
|
## 5.1 Top 10 Stories les Plus Complètes
|
||
|
|
|
||
|
|
| Rang | Fichier | Variants |
|
||
|
|
|------|---------|----------|
|
||
|
|
| 1 | TrackList.stories.tsx | 7 |
|
||
|
|
| 2 | Pagination.stories.tsx | 7 |
|
||
|
|
| 3 | TrackInfo.stories.tsx | 6 |
|
||
|
|
| 4 | Button.stories.tsx | 6 |
|
||
|
|
| 5 | Alert.stories.tsx | 6 |
|
||
|
|
| 6 | TrackListRow.stories.tsx | 5 |
|
||
|
|
| 7 | TrackListPagination.stories.tsx | 5 |
|
||
|
|
| 8 | RepeatShuffleButtons.stories.tsx | 5 |
|
||
|
|
| 9 | PlayPauseButton.stories.tsx | 5 |
|
||
|
|
| 10 | PlayerLoading.stories.tsx | 5 |
|
||
|
|
|
||
|
|
## 5.2 Analyse de Qualité par Feature
|
||
|
|
|
||
|
|
### Player Feature ⭐⭐⭐⭐⭐
|
||
|
|
|
||
|
|
- **Couverture**: 14/22 composants (64%)
|
||
|
|
- **Variants moyens**: 3.4
|
||
|
|
- **Points forts**: Contrôles complets, états multiples
|
||
|
|
- **À améliorer**: PlayerError, PlaybackSpeedControl manquants
|
||
|
|
|
||
|
|
### Tracks Feature ⭐⭐⭐⭐⭐
|
||
|
|
|
||
|
|
- **Couverture**: 19/25 composants (76%)
|
||
|
|
- **Variants moyens**: 3.2
|
||
|
|
- **Points forts**: Liste complète, pagination avancée
|
||
|
|
- **À améliorer**: TrackSearch, TrackSearchResults manquants
|
||
|
|
|
||
|
|
### Playlists Feature ⭐⭐⭐⭐
|
||
|
|
|
||
|
|
- **Couverture**: 10/20 composants (50%)
|
||
|
|
- **Variants moyens**: 1.8
|
||
|
|
- **Points forts**: Actions de base couvertes
|
||
|
|
- **À améliorer**: PlaylistList, PlaylistTrackList, Skeletons
|
||
|
|
|
||
|
|
### Auth Feature ⭐⭐⭐⭐
|
||
|
|
|
||
|
|
- **Couverture**: 8/14 composants (57%)
|
||
|
|
- **Variants moyens**: 2.3
|
||
|
|
- **Points forts**: Formulaires principaux couverts
|
||
|
|
- **À améliorer**: ForgotPasswordForm, TwoFactorVerify
|
||
|
|
|
||
|
|
### Settings Feature ⭐⭐⭐⭐
|
||
|
|
|
||
|
|
- **Couverture**: 8/9 composants (89%)
|
||
|
|
- **Variants moyens**: 1.3
|
||
|
|
- **Points forts**: Tous les panneaux de settings
|
||
|
|
- **À améliorer**: Plus de variants pour chaque setting
|
||
|
|
|
||
|
|
### Chat Feature ⭐⭐⭐⭐
|
||
|
|
|
||
|
|
- **Couverture**: 7/10 composants (70%)
|
||
|
|
- **Variants moyens**: 2.0
|
||
|
|
- **Points forts**: Interface complète
|
||
|
|
- **À améliorer**: VirtualizedChatMessages, CreateRoomDialog
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 6. COMPOSANTS SANS STORIES
|
||
|
|
|
||
|
|
## 6.1 Composants Critiques Manquants (Priorité Haute)
|
||
|
|
|
||
|
|
### Features Sans Aucune Story
|
||
|
|
|
||
|
|
| Feature | Composants | Impact |
|
||
|
|
|---------|------------|--------|
|
||
|
|
| admin | 7 composants | ❌ Critique |
|
||
|
|
| dashboard | Pages principales | ❌ Critique |
|
||
|
|
| error | NotFoundPage, ServerErrorPage | ❌ Critique |
|
||
|
|
| notifications | Pages et composants | ⚠️ Important |
|
||
|
|
| search | SearchPage, résultats | ⚠️ Important |
|
||
|
|
| upload | UploadView, UploadProgressBar | ⚠️ Important |
|
||
|
|
|
||
|
|
### Composants Core Manquants
|
||
|
|
|
||
|
|
```
|
||
|
|
AccessibilitySettingsView
|
||
|
|
AchievementCard
|
||
|
|
AchievementsView
|
||
|
|
AddCollaboratorModal
|
||
|
|
AddEquipmentView
|
||
|
|
AddToPlaylistModal
|
||
|
|
AdminAuditLogsView
|
||
|
|
AdminDashboardView
|
||
|
|
AdminModerationView
|
||
|
|
AdminSettingsView
|
||
|
|
AdminUsersView
|
||
|
|
AdminView
|
||
|
|
AdvancedFilters
|
||
|
|
AnalyticsView
|
||
|
|
APIPlaygroundView
|
||
|
|
AppearanceSettingsView
|
||
|
|
```
|
||
|
|
|
||
|
|
## 6.2 Liste Complète des Composants Sans Stories
|
||
|
|
|
||
|
|
### A-B (26 composants)
|
||
|
|
|
||
|
|
| Composant | Répertoire | Priorité |
|
||
|
|
|-----------|------------|----------|
|
||
|
|
| AccessibilitySettingsView | views | Moyenne |
|
||
|
|
| AchievementCard | gamification | Basse |
|
||
|
|
| AchievementsView | gamification | Basse |
|
||
|
|
| AddCollaboratorModal | playlists | Haute |
|
||
|
|
| AddEquipmentView | inventory | Moyenne |
|
||
|
|
| AddToPlaylistModal | modals | Haute |
|
||
|
|
| AdminAuditLogsView | admin | Haute |
|
||
|
|
| AdminDashboardView | admin | Haute |
|
||
|
|
| AdminModerationView | admin | Haute |
|
||
|
|
| AdminSettingsView | admin | Haute |
|
||
|
|
| AdminUsersView | admin | Haute |
|
||
|
|
| AdminView | views | Haute |
|
||
|
|
| AdvancedFilters | filters | Moyenne |
|
||
|
|
| AnalyticsView | views | Haute |
|
||
|
|
| APIPlaygroundView | developer | Basse |
|
||
|
|
| AppearanceSettingsView | settings | Moyenne |
|
||
|
|
| AudioContext | context | Basse |
|
||
|
|
| AudioPlayer | player | Haute |
|
||
|
|
| AuthContext | context | Basse |
|
||
|
|
| AuthErrorMessage | auth | Moyenne |
|
||
|
|
| AuthFormField | auth | Moyenne |
|
||
|
|
| AuthProvider | providers | Basse |
|
||
|
|
| AuthView | views | Haute |
|
||
|
|
| AutoMetadataDetectionModal | upload | Moyenne |
|
||
|
|
| BackupsView | settings | Basse |
|
||
|
|
| BanUserModal | admin | Haute |
|
||
|
|
| BarChart | charts | Moyenne |
|
||
|
|
|
||
|
|
### C-D (22 composants)
|
||
|
|
|
||
|
|
| Composant | Répertoire | Priorité |
|
||
|
|
|-----------|------------|----------|
|
||
|
|
| Breadcrumbs | navigation | ✅ Créé |
|
||
|
|
| BulkModeBanner | upload | Moyenne |
|
||
|
|
| BulkUploadModal | upload | Haute |
|
||
|
|
| CartContext | context | Basse |
|
||
|
|
| CartItem | commerce | Moyenne |
|
||
|
|
| CartView | views | Haute |
|
||
|
|
| ChangeEmailModal | settings | Moyenne |
|
||
|
|
| ChangeUsernameModal | settings | Moyenne |
|
||
|
|
| Chart | charts | Moyenne |
|
||
|
|
| ChatPage | chat/pages | Haute |
|
||
|
|
| ChatView | views | Haute |
|
||
|
|
| CheckoutView | views | Haute |
|
||
|
|
| CloudIntegrationView | settings | Basse |
|
||
|
|
| CloudSettingsView | settings | Basse |
|
||
|
|
| CollaboratorList | playlists | Moyenne |
|
||
|
|
| ConnectionsView | social | Basse |
|
||
|
|
| ConnectivityView | settings | Basse |
|
||
|
|
| CourseDetailView | education | Moyenne |
|
||
|
|
| CourseLearningView | education | Moyenne |
|
||
|
|
| CoverArtUploadModal | upload | Moyenne |
|
||
|
|
| CreateAPIKeyModal | developer | Basse |
|
||
|
|
| CreatePlaylistModal | playlists | Moyenne |
|
||
|
|
| CreatePostModal | social | Moyenne |
|
||
|
|
| CreateProductView | seller | Moyenne |
|
||
|
|
| CreateProjectModal | studio | Moyenne |
|
||
|
|
| CreateRoomDialog | chat | Haute |
|
||
|
|
| DashboardPage | dashboard | Haute |
|
||
|
|
| DataExportModal | settings | Basse |
|
||
|
|
| DataExportView | settings | Basse |
|
||
|
|
| DeleteAccountConfirmModal | settings | Moyenne |
|
||
|
|
| DeleteAccountView | settings | Moyenne |
|
||
|
|
| DesignSystemDemo | demo | Basse |
|
||
|
|
| DeveloperDashboardView | developer | Basse |
|
||
|
|
| DiscoverView | views | Haute |
|
||
|
|
|
||
|
|
### E-I (35 composants)
|
||
|
|
|
||
|
|
| Composant | Répertoire | Priorité |
|
||
|
|
|-----------|------------|----------|
|
||
|
|
| DuplicatePlaylistButton | playlists | Basse |
|
||
|
|
| EditPlaylistModal | playlists | Moyenne |
|
||
|
|
| EditProfile | profile | Moyenne |
|
||
|
|
| EducationView | views | Moyenne |
|
||
|
|
| EmailVerificationBadge | auth | Moyenne |
|
||
|
|
| EquipmentDetailView | inventory | Moyenne |
|
||
|
|
| ErrorBoundary | components | ✅ Créé |
|
||
|
|
| ExploreView | views | Haute |
|
||
|
|
| FeedView | views | Moyenne |
|
||
|
|
| FileDetailsView | views | Moyenne |
|
||
|
|
| FileManagerView | views | Moyenne |
|
||
|
|
| FilePreviewCard | files | Moyenne |
|
||
|
|
| FileUploadZone | upload | Haute |
|
||
|
|
| FilterBar | filters | ✅ Créé |
|
||
|
|
| Filters | filters | Moyenne |
|
||
|
|
| ForgotPasswordForm | auth | Haute |
|
||
|
|
| ForgotPasswordPage | auth/pages | Haute |
|
||
|
|
| FormBuilder | forms | Basse |
|
||
|
|
| FullPlayer | player | Haute |
|
||
|
|
| GearView | views | Basse |
|
||
|
|
| GlobalSearchBar | search | Haute |
|
||
|
|
| GoLiveView | studio | Moyenne |
|
||
|
|
| Grid | base | Basse |
|
||
|
|
| GroupDetailView | social | Moyenne |
|
||
|
|
| ImportPlaylistButton | playlists | Basse |
|
||
|
|
| IntegrationsView | settings | Basse |
|
||
|
|
|
||
|
|
### K-P (40 composants)
|
||
|
|
|
||
|
|
| Composant | Répertoire | Priorité |
|
||
|
|
|-----------|------------|----------|
|
||
|
|
| KeyboardShortcutsHelp | keyboard | Moyenne |
|
||
|
|
| Layout | layout | Moyenne |
|
||
|
|
| LazyComponent | ui | Basse |
|
||
|
|
| LazyToaster | ui | Basse |
|
||
|
|
| LeaderboardView | gamification | Basse |
|
||
|
|
| LibraryPage | library/pages | Haute |
|
||
|
|
| LicenceCard | commerce | Moyenne |
|
||
|
|
| LicenceDetailsModal | commerce | Moyenne |
|
||
|
|
| LineChart | charts | Moyenne |
|
||
|
|
| List | base | Basse |
|
||
|
|
| LiveView | views | Haute |
|
||
|
|
| Login | pages/auth | Haute |
|
||
|
|
| LoginHistory | auth | Moyenne |
|
||
|
|
| LoginPage | auth/pages | Haute |
|
||
|
|
| LyricsEditorModal | studio | Moyenne |
|
||
|
|
| LyricsPanel | studio | Moyenne |
|
||
|
|
| MarketplaceHome | marketplace | Haute |
|
||
|
|
| MarketplaceView | views | Haute |
|
||
|
|
| MessageSearch | chat | Moyenne |
|
||
|
|
| MetadataEditor | upload | Moyenne |
|
||
|
|
| MetadataForm | upload | Moyenne |
|
||
|
|
| MonitoringDashboard | monitoring | Basse |
|
||
|
|
| Navbar | layout | ✅ Créé |
|
||
|
|
| NotFoundPage | error/pages | Haute |
|
||
|
|
| NotificationsPage | notifications/pages | Haute |
|
||
|
|
| NotificationsView | views | Haute |
|
||
|
|
| OAuthButton | auth | Moyenne |
|
||
|
|
| OAuthCallbackPage | auth/pages | Moyenne |
|
||
|
|
| OfflineIndicator | components | ✅ Créé |
|
||
|
|
| OfflineQueueManager | pwa | Moyenne |
|
||
|
|
| Onboarding | onboarding | Haute |
|
||
|
|
| OrderSummary | commerce | Moyenne |
|
||
|
|
| Page | base | Basse |
|
||
|
|
| Pagination | navigation | ✅ Créé |
|
||
|
|
| PasskeyModal | auth | Moyenne |
|
||
|
|
| PieChart | charts | Moyenne |
|
||
|
|
| PlaybackSpeedControl | player | Moyenne |
|
||
|
|
| PlaybackSpeedModal | player | Basse |
|
||
|
|
| PlayerError | player | Haute |
|
||
|
|
|
||
|
|
### P-S (45 composants)
|
||
|
|
|
||
|
|
| Composant | Répertoire | Priorité |
|
||
|
|
|-----------|------------|----------|
|
||
|
|
| PlaylistBatchActions | playlists | Moyenne |
|
||
|
|
| PlaylistCardSkeleton | playlists | Basse |
|
||
|
|
| PlaylistDetailPage | playlists/pages | Haute |
|
||
|
|
| PlaylistDetailView | views | Haute |
|
||
|
|
| PlaylistErrorBoundary | playlists | Moyenne |
|
||
|
|
| PlaylistHeaderSkeleton | playlists | Basse |
|
||
|
|
| PlaylistList | playlists | Haute |
|
||
|
|
| PlaylistListPage | playlists/pages | Haute |
|
||
|
|
| PlaylistListSkeleton | playlists | Basse |
|
||
|
|
| PlaylistRecommendations | playlists | Moyenne |
|
||
|
|
| PlaylistSearch | playlists | Moyenne |
|
||
|
|
| PlaylistsView | views | Haute |
|
||
|
|
| PlaylistTrackItem | playlists | Moyenne |
|
||
|
|
| PlaylistTrackList | playlists | Haute |
|
||
|
|
| PlaylistTrackListSkeleton | playlists | Basse |
|
||
|
|
| ProductDetailView | marketplace | Haute |
|
||
|
|
| ProfileForm | user | Moyenne |
|
||
|
|
| ProfileView | views | Haute |
|
||
|
|
| ProfileXPView | gamification | Basse |
|
||
|
|
| ProjectDetailView | studio | Moyenne |
|
||
|
|
| PromoCodeModal | commerce | Basse |
|
||
|
|
| ProtectedRoute | auth | Basse |
|
||
|
|
| PurchasesView | views | Moyenne |
|
||
|
|
| PWAInstallBanner | pwa | Moyenne |
|
||
|
|
| QueuePanel | player | Moyenne |
|
||
|
|
| QueueView | views | Moyenne |
|
||
|
|
| RateLimitIndicator | developer | Basse |
|
||
|
|
| RefundRequestModal | commerce | Basse |
|
||
|
|
| Register | pages/auth | Haute |
|
||
|
|
| RegisterPage | auth/pages | Haute |
|
||
|
|
| RemoveTrackButton | playlists | Basse |
|
||
|
|
| ResetPasswordPage | auth/pages | Haute |
|
||
|
|
| ReviewProductModal | marketplace | Moyenne |
|
||
|
|
| RolesPage | roles/pages | Haute |
|
||
|
|
| SaveQueueAsPlaylistModal | player | Moyenne |
|
||
|
|
| SearchPage | search/pages | Haute |
|
||
|
|
| SecuritySettings | settings | Haute |
|
||
|
|
| ServerErrorPage | error/pages | Haute |
|
||
|
|
| SessionManagement | settings | Moyenne |
|
||
|
|
| SessionsPage | sessions/pages | Moyenne |
|
||
|
|
| SettingsPage | settings/pages | Haute |
|
||
|
|
| SettingsView | views | Haute |
|
||
|
|
| ShareLinkManager | share | Moyenne |
|
||
|
|
| SharePlaylistModal | playlists | Moyenne |
|
||
|
|
| SharePostModal | social | Basse |
|
||
|
|
| SocialView | views | Moyenne |
|
||
|
|
| Sort | filters | Basse |
|
||
|
|
|
||
|
|
### S-Z (35 composants)
|
||
|
|
|
||
|
|
| Composant | Répertoire | Priorité |
|
||
|
|
|-----------|------------|----------|
|
||
|
|
| StudioView | views | Haute |
|
||
|
|
| SwaggerUI | developer | Basse |
|
||
|
|
| TagSuggestionsModal | upload | Basse |
|
||
|
|
| ThemeContext | context | Basse |
|
||
|
|
| ThemeProvider | providers | Basse |
|
||
|
|
| Timeline | analytics | Moyenne |
|
||
|
|
| ToastProvider | feedback | Basse |
|
||
|
|
| TrackAnalyticsView | tracks | Haute |
|
||
|
|
| TrackDetailPage | tracks/pages | Haute |
|
||
|
|
| TrackListContainer | tracks | Moyenne |
|
||
|
|
| TrackSearch | tracks | Haute |
|
||
|
|
| TrackSearchFilters | tracks | Moyenne |
|
||
|
|
| TrackSearchResults | tracks | Haute |
|
||
|
|
| TwoFactorSetup | auth | Haute |
|
||
|
|
| TwoFactorVerify | auth | Haute |
|
||
|
|
| UploadProgressBar | upload | Haute |
|
||
|
|
| UploadView | views | Haute |
|
||
|
|
| UserCard | user | Moyenne |
|
||
|
|
| UserProfilePage | profile/pages | Haute |
|
||
|
|
| UserTableRow | admin | Moyenne |
|
||
|
|
| VerifyEmailPage | auth/pages | Haute |
|
||
|
|
| VirtualizedChatMessages | chat | Moyenne |
|
||
|
|
| VisualizerSettingsModal | player | Basse |
|
||
|
|
| WatermarkSettingsModal | studio | Basse |
|
||
|
|
| WebhooksView | webhooks | Basse |
|
||
|
|
| WishlistView | views | Moyenne |
|
||
|
|
| XPBar | gamification | Basse |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 7. QUALITÉ DES STORIES
|
||
|
|
|
||
|
|
## 7.1 Métriques de Qualité
|
||
|
|
|
||
|
|
| Critère | Valeur | Objectif | Statut |
|
||
|
|
|---------|--------|----------|--------|
|
||
|
|
| Decorators locaux | 0 | > 0 | ⚠️ |
|
||
|
|
| Play Functions | 0 | > 20 | ❌ |
|
||
|
|
| ArgTypes définis | 0 | > 50 | ❌ |
|
||
|
|
| Stories avec actions | ~50 | > 100 | ⚠️ |
|
||
|
|
| Autodocs activé | ✅ | ✅ | ✅ |
|
||
|
|
| Viewports configurés | ✅ | ✅ | ✅ |
|
||
|
|
| A11y configuré | ✅ | ✅ | ✅ |
|
||
|
|
|
||
|
|
## 7.2 Patterns Observés
|
||
|
|
|
||
|
|
### Points Positifs ✅
|
||
|
|
|
||
|
|
1. **Structure cohérente**: Toutes les stories suivent le pattern Meta/StoryObj
|
||
|
|
2. **Autodocs**: Auto-génération de documentation activée
|
||
|
|
3. **Variants multiples**: Moyenne de 3.5 variants par story
|
||
|
|
4. **Naming conventionnel**: Default, WithX, Disabled, etc.
|
||
|
|
|
||
|
|
### Points à Améliorer ❌
|
||
|
|
|
||
|
|
1. **Pas de play functions**: Aucun test d'interaction automatisé
|
||
|
|
2. **Pas d'argTypes**: Les contrôles ne sont pas documentés
|
||
|
|
3. **Decorators non utilisés**: Tout repose sur les globaux
|
||
|
|
4. **Pas de loaders**: Pas de données mockées asynchrones
|
||
|
|
|
||
|
|
## 7.3 Exemples de Bonnes Pratiques
|
||
|
|
|
||
|
|
### Story Bien Structurée (Exemple)
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
// Exemple idéal de story
|
||
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
||
|
|
import { within, userEvent } from '@storybook/testing-library';
|
||
|
|
import { expect } from '@storybook/jest';
|
||
|
|
import { Button } from './Button';
|
||
|
|
|
||
|
|
const meta: Meta<typeof Button> = {
|
||
|
|
title: 'Components/UI/Button',
|
||
|
|
component: Button,
|
||
|
|
parameters: {
|
||
|
|
layout: 'centered',
|
||
|
|
docs: {
|
||
|
|
description: {
|
||
|
|
component: 'A customizable button component with multiple variants.',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
tags: ['autodocs'],
|
||
|
|
argTypes: {
|
||
|
|
variant: {
|
||
|
|
control: 'select',
|
||
|
|
options: ['default', 'destructive', 'outline', 'ghost'],
|
||
|
|
description: 'The visual style of the button',
|
||
|
|
},
|
||
|
|
size: {
|
||
|
|
control: 'select',
|
||
|
|
options: ['sm', 'default', 'lg'],
|
||
|
|
description: 'The size of the button',
|
||
|
|
},
|
||
|
|
disabled: {
|
||
|
|
control: 'boolean',
|
||
|
|
description: 'Whether the button is disabled',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default meta;
|
||
|
|
type Story = StoryObj<typeof Button>;
|
||
|
|
|
||
|
|
export const Default: Story = {
|
||
|
|
args: {
|
||
|
|
children: 'Click me',
|
||
|
|
},
|
||
|
|
play: async ({ canvasElement }) => {
|
||
|
|
const canvas = within(canvasElement);
|
||
|
|
const button = canvas.getByRole('button');
|
||
|
|
await expect(button).toBeInTheDocument();
|
||
|
|
await userEvent.click(button);
|
||
|
|
},
|
||
|
|
};
|
||
|
|
```
|
||
|
|
|
||
|
|
## 7.4 Analyse des Variants
|
||
|
|
|
||
|
|
### Distribution des Variants
|
||
|
|
|
||
|
|
| Variants | Nombre de Stories | % |
|
||
|
|
|----------|-------------------|---|
|
||
|
|
| 1 variant | 35 | 21% |
|
||
|
|
| 2 variants | 42 | 26% |
|
||
|
|
| 3 variants | 28 | 17% |
|
||
|
|
| 4 variants | 25 | 15% |
|
||
|
|
| 5+ variants | 34 | 21% |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 8. RECOMMANDATIONS
|
||
|
|
|
||
|
|
## 8.1 Priorité Haute (Immédiat)
|
||
|
|
|
||
|
|
### R1: Ajouter des Play Functions
|
||
|
|
|
||
|
|
**Impact**: Tests automatisés, CI/CD
|
||
|
|
**Effort**: Moyen
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
// Exemple de play function
|
||
|
|
export const Interactive: Story = {
|
||
|
|
play: async ({ canvasElement }) => {
|
||
|
|
const canvas = within(canvasElement);
|
||
|
|
const button = canvas.getByRole('button');
|
||
|
|
await userEvent.click(button);
|
||
|
|
await expect(canvas.getByText('Clicked!')).toBeInTheDocument();
|
||
|
|
},
|
||
|
|
};
|
||
|
|
```
|
||
|
|
|
||
|
|
### R2: Documenter les ArgTypes
|
||
|
|
|
||
|
|
**Impact**: Documentation, DX
|
||
|
|
**Effort**: Élevé
|
||
|
|
|
||
|
|
Ajouter des argTypes pour chaque prop avec:
|
||
|
|
- `description`: Explication de la prop
|
||
|
|
- `control`: Type de contrôle approprié
|
||
|
|
- `options`: Valeurs possibles pour les enums
|
||
|
|
|
||
|
|
### R3: Couvrir les Features Critiques
|
||
|
|
|
||
|
|
**Impact**: Documentation complète
|
||
|
|
**Effort**: Élevé
|
||
|
|
|
||
|
|
Priorités:
|
||
|
|
1. Admin (7 composants)
|
||
|
|
2. Dashboard (pages principales)
|
||
|
|
3. Error (NotFoundPage, ServerErrorPage)
|
||
|
|
4. Upload (UploadView, UploadProgressBar)
|
||
|
|
|
||
|
|
## 8.2 Priorité Moyenne
|
||
|
|
|
||
|
|
### R4: Ajouter des Loaders
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
const meta: Meta<typeof UserProfile> = {
|
||
|
|
loaders: [
|
||
|
|
async () => ({
|
||
|
|
user: await fetchMockUser(),
|
||
|
|
}),
|
||
|
|
],
|
||
|
|
};
|
||
|
|
```
|
||
|
|
|
||
|
|
### R5: Configurer Chromatic
|
||
|
|
|
||
|
|
Intégrer Chromatic pour les tests de régression visuelle:
|
||
|
|
- Capture automatique de screenshots
|
||
|
|
- Détection des changements visuels
|
||
|
|
- Approbation dans PR
|
||
|
|
|
||
|
|
### R6: Créer des Stories MDX
|
||
|
|
|
||
|
|
Documenter les patterns de design avec des stories MDX:
|
||
|
|
- Guide des couleurs
|
||
|
|
- Typographie
|
||
|
|
- Espacements
|
||
|
|
- Animations
|
||
|
|
|
||
|
|
## 8.3 Priorité Basse
|
||
|
|
|
||
|
|
### R7: Ajouter des Decorators Personnalisés
|
||
|
|
|
||
|
|
Créer des decorators réutilisables:
|
||
|
|
- `withMockAuth`: Simuler un utilisateur connecté
|
||
|
|
- `withDarkMode`: Forcer le dark mode
|
||
|
|
- `withMobile`: Simuler un viewport mobile
|
||
|
|
|
||
|
|
### R8: Optimiser le Build
|
||
|
|
|
||
|
|
- Activer le tree-shaking
|
||
|
|
- Configurer le code-splitting
|
||
|
|
- Réduire le bundle size
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 9. PLAN D'ACTION PRIORITAIRE
|
||
|
|
|
||
|
|
## Phase 1: Fondations (1-2 semaines)
|
||
|
|
|
||
|
|
| Tâche | Priorité | Effort | Description |
|
||
|
|
|-------|----------|--------|-------------|
|
||
|
|
| ArgTypes pour UI | Haute | 3j | Documenter tous les composants UI |
|
||
|
|
| Play functions critiques | Haute | 2j | Ajouter 20 play functions |
|
||
|
|
| Stories Admin | Haute | 2j | 7 composants admin |
|
||
|
|
| Stories Error | Haute | 1j | NotFoundPage, ServerErrorPage |
|
||
|
|
|
||
|
|
## Phase 2: Expansion (2-4 semaines)
|
||
|
|
|
||
|
|
| Tâche | Priorité | Effort | Description |
|
||
|
|
|-------|----------|--------|-------------|
|
||
|
|
| Stories Dashboard | Moyenne | 2j | Pages principales |
|
||
|
|
| Stories Upload | Moyenne | 2j | Flux d'upload complet |
|
||
|
|
| Stories Playlists manquantes | Moyenne | 2j | PlaylistList, skeletons |
|
||
|
|
| MDX Design System | Moyenne | 3j | Documentation tokens |
|
||
|
|
|
||
|
|
## Phase 3: Optimisation (4-6 semaines)
|
||
|
|
|
||
|
|
| Tâche | Priorité | Effort | Description |
|
||
|
|
|-------|----------|--------|-------------|
|
||
|
|
| Chromatic Setup | Moyenne | 1j | Tests visuels |
|
||
|
|
| Coverage > 60% | Moyenne | 5j | Composants restants |
|
||
|
|
| Decorators custom | Basse | 2j | Réutilisabilité |
|
||
|
|
| Performance | Basse | 1j | Optimisation build |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 10. ANNEXES
|
||
|
|
|
||
|
|
## A. Scripts Utiles
|
||
|
|
|
||
|
|
### Coverage Script
|
||
|
|
|
||
|
|
```bash
|
||
|
|
#!/bin/bash
|
||
|
|
# scripts/storybook-coverage.sh
|
||
|
|
# Analyse la couverture des stories
|
||
|
|
|
||
|
|
COMPONENT_COUNT=$(find src -name "*.tsx" ! -name "*.stories.tsx" ! -name "*.test.tsx" | wc -l)
|
||
|
|
STORY_COUNT=$(find src -name "*.stories.tsx" | wc -l)
|
||
|
|
COVERAGE=$((STORY_COUNT * 100 / COMPONENT_COUNT))
|
||
|
|
|
||
|
|
echo "📊 Coverage: $STORY_COUNT/$COMPONENT_COUNT ($COVERAGE%)"
|
||
|
|
```
|
||
|
|
|
||
|
|
### Liste des composants sans stories
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Obtenir la liste des composants sans stories
|
||
|
|
for component in $(find src -name "*.tsx" ! -name "*.stories.tsx" ! -name "*.test.tsx" -exec basename {} .tsx \;); do
|
||
|
|
if ! find src -name "${component}.stories.tsx" | grep -q .; then
|
||
|
|
echo "$component"
|
||
|
|
fi
|
||
|
|
done
|
||
|
|
```
|
||
|
|
|
||
|
|
## B. Configuration Recommandée
|
||
|
|
|
||
|
|
### Chromatic Configuration
|
||
|
|
|
||
|
|
```javascript
|
||
|
|
// chromatic.config.js
|
||
|
|
module.exports = {
|
||
|
|
projectId: 'your-project-id',
|
||
|
|
buildScriptName: 'build-storybook',
|
||
|
|
onlyChanged: true,
|
||
|
|
externals: ['public/**'],
|
||
|
|
};
|
||
|
|
```
|
||
|
|
|
||
|
|
### Test Runner Configuration
|
||
|
|
|
||
|
|
```javascript
|
||
|
|
// .storybook/test-runner.ts
|
||
|
|
import { TestRunnerConfig } from '@storybook/test-runner';
|
||
|
|
|
||
|
|
const config: TestRunnerConfig = {
|
||
|
|
async postRender(page, context) {
|
||
|
|
// Vérifier l'accessibilité
|
||
|
|
await runAccessibilityChecks(page);
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default config;
|
||
|
|
```
|
||
|
|
|
||
|
|
## C. Glossaire
|
||
|
|
|
||
|
|
| Terme | Définition |
|
||
|
|
|-------|------------|
|
||
|
|
| **Story** | Une représentation visuelle d'un composant avec des props spécifiques |
|
||
|
|
| **Variant** | Une version spécifique d'une story (ex: Default, Disabled) |
|
||
|
|
| **Decorator** | Un wrapper qui ajoute du contexte aux stories |
|
||
|
|
| **Play Function** | Un script de test automatisé pour une story |
|
||
|
|
| **ArgTypes** | La documentation des props d'un composant |
|
||
|
|
| **Autodocs** | Génération automatique de documentation |
|
||
|
|
| **MDX** | Format combinant Markdown et JSX |
|
||
|
|
|
||
|
|
## D. Ressources
|
||
|
|
|
||
|
|
- [Documentation Storybook](https://storybook.js.org/docs)
|
||
|
|
- [Storybook for React](https://storybook.js.org/docs/react/get-started/introduction)
|
||
|
|
- [Addon A11y](https://storybook.js.org/addons/@storybook/addon-a11y)
|
||
|
|
- [Testing with Storybook](https://storybook.js.org/docs/react/writing-tests/introduction)
|
||
|
|
- [Chromatic](https://www.chromatic.com/docs/)
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## E. Historique des Versions
|
||
|
|
|
||
|
|
| Version | Date | Changements |
|
||
|
|
|---------|------|-------------|
|
||
|
|
| 1.0 | 02/02/2026 | Audit initial complet |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## F. Auteurs et Contributeurs
|
||
|
|
|
||
|
|
- **Audit réalisé par**: Antigravity AI Assistant
|
||
|
|
- **Projet**: Veza Music Platform
|
||
|
|
- **Repository**: apps/web
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
*Ce document a été généré automatiquement et représente l'état actuel du Storybook Veza au 2 Février 2026.*
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 11. ANALYSE DÉTAILLÉE DES FICHIERS STORIES
|
||
|
|
|
||
|
|
## 11.1 Stories UI - Analyse Individuelle
|
||
|
|
|
||
|
|
### Button.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/components/ui/Button.stories.tsx
|
||
|
|
Lignes: ~80
|
||
|
|
Variants: 6
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | État par défaut | - |
|
||
|
|
| Variants | Toutes les variantes | variant |
|
||
|
|
| Sizes | Toutes les tailles | size |
|
||
|
|
| WithIcon | Avec icône | children, icon |
|
||
|
|
| Destructive | Action destructive | variant="destructive" |
|
||
|
|
| LoadingState | État de chargement | loading, disabled |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐⭐
|
||
|
|
- ✅ Couvre toutes les variantes
|
||
|
|
- ✅ États interactifs
|
||
|
|
- ⚠️ Manque argTypes
|
||
|
|
- ❌ Pas de play function
|
||
|
|
|
||
|
|
### Input.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/components/ui/Input.stories.tsx
|
||
|
|
Lignes: ~70
|
||
|
|
Variants: 5
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Input basique | - |
|
||
|
|
| WithLabel | Avec label | label |
|
||
|
|
| WithIcon | Avec icône | leftIcon |
|
||
|
|
| Password | Type password | type="password" |
|
||
|
|
| Search | Type recherche | type="search" |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐
|
||
|
|
- ✅ Types essentiels couverts
|
||
|
|
- ✅ Labels et icônes
|
||
|
|
- ⚠️ Manque état erreur
|
||
|
|
- ⚠️ Manque disabled
|
||
|
|
|
||
|
|
### Alert.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/components/ui/Alert.stories.tsx
|
||
|
|
Lignes: ~90
|
||
|
|
Variants: 6
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Alerte info | - |
|
||
|
|
| Success | Alerte succès | variant="success" |
|
||
|
|
| Warning | Alerte warning | variant="warning" |
|
||
|
|
| Error | Alerte erreur | variant="error" |
|
||
|
|
| WithClose | Avec bouton fermer | closable |
|
||
|
|
| ComplexContent | Contenu complexe | children |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐⭐
|
||
|
|
- ✅ Toutes les variantes
|
||
|
|
- ✅ Actions de fermeture
|
||
|
|
- ✅ Contenu complexe
|
||
|
|
- ⚠️ Manque animation
|
||
|
|
|
||
|
|
### Select.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/components/ui/Select.stories.tsx
|
||
|
|
Lignes: ~80
|
||
|
|
Variants: 3
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Sélection simple | options |
|
||
|
|
| Grouped | Options groupées | groups |
|
||
|
|
| MultiSelect | Sélection multiple | multiple |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐
|
||
|
|
- ✅ Modes essentiels
|
||
|
|
- ✅ Groupes d'options
|
||
|
|
- ⚠️ Manque recherche
|
||
|
|
- ⚠️ Manque async loading
|
||
|
|
|
||
|
|
### Dialog.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/components/ui/Dialog.stories.tsx
|
||
|
|
Lignes: ~70
|
||
|
|
Variants: 3
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Dialog basique | title, children |
|
||
|
|
| Alert | Dialog d'alerte | variant="alert" |
|
||
|
|
| Composition | Composition avancée | header, footer |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐
|
||
|
|
- ✅ Modes principaux
|
||
|
|
- ✅ Composition flexible
|
||
|
|
- ⚠️ Manque animation test
|
||
|
|
- ⚠️ Manque focus trap test
|
||
|
|
|
||
|
|
### Avatar.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/components/ui/Avatar.stories.tsx
|
||
|
|
Lignes: ~70
|
||
|
|
Variants: 4
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| WithImage | Avec image | src |
|
||
|
|
| FallbackInitials | Initiales fallback | name |
|
||
|
|
| Sizes | Toutes les tailles | size |
|
||
|
|
| Statuses | États de statut | status |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐⭐
|
||
|
|
- ✅ Fallback correct
|
||
|
|
- ✅ Tailles complètes
|
||
|
|
- ✅ Statuts visuels
|
||
|
|
- ✅ Image loading
|
||
|
|
|
||
|
|
### Toast.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/components/ui/Toast.stories.tsx
|
||
|
|
Lignes: ~70
|
||
|
|
Variants: 4
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Toast info | message |
|
||
|
|
| Success | Toast succès | type="success" |
|
||
|
|
| Error | Toast erreur | type="error" |
|
||
|
|
| ToastDemo | Demo interactive | actions |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐
|
||
|
|
- ✅ Types principaux
|
||
|
|
- ✅ Actions
|
||
|
|
- ⚠️ Manque duration test
|
||
|
|
- ⚠️ Manque position test
|
||
|
|
|
||
|
|
### Skeleton.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/components/ui/Skeleton.stories.tsx
|
||
|
|
Lignes: ~60
|
||
|
|
Variants: 4
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Squelette ligne | - |
|
||
|
|
| CardLoading | Squelette carte | - |
|
||
|
|
| AvatarLoading | Squelette avatar | - |
|
||
|
|
| Circular | Forme circulaire | circle |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐
|
||
|
|
- ✅ Formes variées
|
||
|
|
- ✅ Cas d'usage réels
|
||
|
|
- ⚠️ Manque animate test
|
||
|
|
- ⚠️ Manque custom size
|
||
|
|
|
||
|
|
## 11.2 Stories Player - Analyse Individuelle
|
||
|
|
|
||
|
|
### GlobalPlayer.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/features/player/components/GlobalPlayer.stories.tsx
|
||
|
|
Lignes: ~60
|
||
|
|
Variants: 2
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | État par défaut | - |
|
||
|
|
| WithTrack | Avec piste active | track |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐
|
||
|
|
- ✅ États principaux
|
||
|
|
- ⚠️ Manque mini/expanded toggle
|
||
|
|
- ⚠️ Manque play/pause test
|
||
|
|
- ❌ Dépendances complexes
|
||
|
|
|
||
|
|
### PlayerControls.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/features/player/components/PlayerControls.stories.tsx
|
||
|
|
Lignes: ~50
|
||
|
|
Variants: 2
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Playing | État lecture | isPlaying=true |
|
||
|
|
| Paused | État pause | isPlaying=false |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐
|
||
|
|
- ✅ États toggle
|
||
|
|
- ✅ Controls visibles
|
||
|
|
- ⚠️ Manque seek test
|
||
|
|
- ⚠️ Manque volume test
|
||
|
|
|
||
|
|
### PlayPauseButton.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/features/player/components/PlayPauseButton.stories.tsx
|
||
|
|
Lignes: ~55
|
||
|
|
Variants: 5
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Playing | Lecture active | isPlaying=true |
|
||
|
|
| Paused | En pause | isPlaying=false |
|
||
|
|
| Loading | Chargement | loading=true |
|
||
|
|
| Disabled | Désactivé | disabled=true |
|
||
|
|
| Small | Petite taille | size="sm" |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐⭐
|
||
|
|
- ✅ Tous les états
|
||
|
|
- ✅ Toutes les tailles
|
||
|
|
- ✅ États interactifs
|
||
|
|
- ⚠️ Manque click handler test
|
||
|
|
|
||
|
|
### VolumeControl.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/features/player/components/VolumeControl.stories.tsx
|
||
|
|
Lignes: ~50
|
||
|
|
Variants: 4
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Volume normal | volume=0.7 |
|
||
|
|
| Muted | Son coupé | muted=true |
|
||
|
|
| Low | Volume bas | volume=0.2 |
|
||
|
|
| Max | Volume max | volume=1 |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐⭐
|
||
|
|
- ✅ Tous niveaux
|
||
|
|
- ✅ État muté
|
||
|
|
- ✅ Icônes cohérentes
|
||
|
|
- ⚠️ Manque slider drag test
|
||
|
|
|
||
|
|
### TrackInfo.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/features/player/components/TrackInfo.stories.tsx
|
||
|
|
Lignes: ~80
|
||
|
|
Variants: 6
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Info complète | track |
|
||
|
|
| Loading | Chargement | loading=true |
|
||
|
|
| NoArtist | Sans artiste | track.artist=null |
|
||
|
|
| LongTitle | Titre long | track.title |
|
||
|
|
| WithCover | Avec pochette | track.cover |
|
||
|
|
| Minimal | Mode minimal | minimal=true |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐⭐
|
||
|
|
- ✅ Cas edge couverts
|
||
|
|
- ✅ États loading
|
||
|
|
- ✅ Overflow text
|
||
|
|
- ✅ Modes d'affichage
|
||
|
|
|
||
|
|
## 11.3 Stories Tracks - Analyse Individuelle
|
||
|
|
|
||
|
|
### TrackList.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/features/tracks/components/TrackList.stories.tsx
|
||
|
|
Lignes: ~150
|
||
|
|
Variants: 7
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Liste standard | tracks |
|
||
|
|
| Empty | Liste vide | tracks=[] |
|
||
|
|
| Loading | Chargement | loading=true |
|
||
|
|
| Selectable | Sélection | selectable=true |
|
||
|
|
| WithPagination | Avec pagination | pagination |
|
||
|
|
| Playing | Piste en lecture | playingId |
|
||
|
|
| Error | État erreur | error |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐⭐
|
||
|
|
- ✅ Tous les états
|
||
|
|
- ✅ Données mock complètes
|
||
|
|
- ✅ Pagination
|
||
|
|
- ✅ Sélection
|
||
|
|
|
||
|
|
### TrackCard.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/features/tracks/components/TrackCard.stories.tsx
|
||
|
|
Lignes: ~60
|
||
|
|
Variants: 3
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Carte standard | track |
|
||
|
|
| Playing | En lecture | isPlaying=true |
|
||
|
|
| Compact | Mode compact | variant="compact" |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐
|
||
|
|
- ✅ États principaux
|
||
|
|
- ✅ Mode compact
|
||
|
|
- ⚠️ Manque hover state
|
||
|
|
- ⚠️ Manque actions menu
|
||
|
|
|
||
|
|
### CommentThread.stories.tsx
|
||
|
|
|
||
|
|
```
|
||
|
|
Chemin: src/features/tracks/components/CommentThread.stories.tsx
|
||
|
|
Lignes: ~120
|
||
|
|
Variants: 4
|
||
|
|
```
|
||
|
|
|
||
|
|
| Variant | Description | Props Testées |
|
||
|
|
|---------|-------------|---------------|
|
||
|
|
| Default | Thread standard | comments |
|
||
|
|
| Empty | Sans commentaires | comments=[] |
|
||
|
|
| WithReplies | Avec réponses | replies |
|
||
|
|
| Loading | Chargement | loading=true |
|
||
|
|
|
||
|
|
**Qualité**: ⭐⭐⭐⭐
|
||
|
|
- ✅ Structure imbriquée
|
||
|
|
- ✅ États loading
|
||
|
|
- ⚠️ Manque pagination
|
||
|
|
- ⚠️ Manque actions (like, reply)
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 12. MATRICE DE PRIORITÉ DES COMPOSANTS
|
||
|
|
|
||
|
|
## 12.1 Matrice Impact/Effort
|
||
|
|
|
||
|
|
| Composant | Impact | Effort | Score | Priorité |
|
||
|
|
|-----------|--------|--------|-------|----------|
|
||
|
|
| NotFoundPage | Haut | Bas | 9 | P1 |
|
||
|
|
| ServerErrorPage | Haut | Bas | 9 | P1 |
|
||
|
|
| DashboardPage | Haut | Moyen | 8 | P1 |
|
||
|
|
| AdminDashboardView | Haut | Moyen | 8 | P1 |
|
||
|
|
| LoginPage | Haut | Bas | 8 | P1 |
|
||
|
|
| SearchPage | Haut | Moyen | 7 | P2 |
|
||
|
|
| UploadView | Haut | Élevé | 6 | P2 |
|
||
|
|
| PlaylistList | Moyen | Bas | 6 | P2 |
|
||
|
|
| PlayerError | Moyen | Bas | 6 | P2 |
|
||
|
|
| TrackSearch | Moyen | Moyen | 5 | P3 |
|
||
|
|
| ChatPage | Moyen | Élevé | 4 | P3 |
|
||
|
|
| GamificationView | Bas | Moyen | 3 | P4 |
|
||
|
|
| DeveloperTools | Bas | Élevé | 2 | P4 |
|
||
|
|
|
||
|
|
## 12.2 Classification par Criticité
|
||
|
|
|
||
|
|
### 🔴 Critique (P1) - À faire immédiatement
|
||
|
|
|
||
|
|
| Composant | Raison | Effort Estimé |
|
||
|
|
|-----------|--------|---------------|
|
||
|
|
| NotFoundPage | UX critique - erreur 404 | 1h |
|
||
|
|
| ServerErrorPage | UX critique - erreur 500 | 1h |
|
||
|
|
| DashboardPage | Page principale | 2h |
|
||
|
|
| AdminDashboardView | Admin access | 3h |
|
||
|
|
| LoginPage | Authentification | 2h |
|
||
|
|
| RegisterPage | Inscription | 2h |
|
||
|
|
|
||
|
|
### 🟠 Haute (P2) - Cette semaine
|
||
|
|
|
||
|
|
| Composant | Raison | Effort Estimé |
|
||
|
|
|-----------|--------|---------------|
|
||
|
|
| SearchPage | Navigation principale | 3h |
|
||
|
|
| UploadView | Fonctionnalité core | 4h |
|
||
|
|
| PlaylistList | Feature populaire | 2h |
|
||
|
|
| PlayerError | Gestion erreurs | 1h |
|
||
|
|
| AdminUsersView | Gestion utilisateurs | 3h |
|
||
|
|
| AdminModerationView | Modération | 3h |
|
||
|
|
|
||
|
|
### 🟡 Moyenne (P3) - Ce mois
|
||
|
|
|
||
|
|
| Composant | Raison | Effort Estimé |
|
||
|
|
|-----------|--------|---------------|
|
||
|
|
| TrackSearch | Recherche | 3h |
|
||
|
|
| ChatPage | Communication | 4h |
|
||
|
|
| ProfilePage | Profil utilisateur | 3h |
|
||
|
|
| SettingsPage | Configuration | 2h |
|
||
|
|
| LibraryPage | Bibliothèque | 3h |
|
||
|
|
|
||
|
|
### 🟢 Basse (P4) - Plus tard
|
||
|
|
|
||
|
|
| Composant | Raison | Effort Estimé |
|
||
|
|
|-----------|--------|---------------|
|
||
|
|
| GamificationView | Non critique | 4h |
|
||
|
|
| DeveloperTools | Usage limité | 5h |
|
||
|
|
| WebhooksView | Usage avancé | 3h |
|
||
|
|
| APIPlayground | Développeurs | 4h |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 13. EXEMPLES DE BONNES PRATIQUES
|
||
|
|
|
||
|
|
## 13.1 Story Complète avec Play Function
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
||
|
|
import { within, userEvent, expect } from '@storybook/test';
|
||
|
|
import { Button } from './Button';
|
||
|
|
|
||
|
|
const meta: Meta<typeof Button> = {
|
||
|
|
title: 'Components/UI/Button',
|
||
|
|
component: Button,
|
||
|
|
parameters: {
|
||
|
|
layout: 'centered',
|
||
|
|
docs: {
|
||
|
|
description: {
|
||
|
|
component: `
|
||
|
|
A versatile button component that supports multiple variants,
|
||
|
|
sizes, and states. Fully accessible with keyboard navigation.
|
||
|
|
`,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
tags: ['autodocs'],
|
||
|
|
argTypes: {
|
||
|
|
variant: {
|
||
|
|
control: 'select',
|
||
|
|
options: ['default', 'destructive', 'outline', 'ghost', 'link'],
|
||
|
|
description: 'Visual style of the button',
|
||
|
|
table: {
|
||
|
|
type: { summary: 'string' },
|
||
|
|
defaultValue: { summary: 'default' },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
size: {
|
||
|
|
control: 'select',
|
||
|
|
options: ['sm', 'default', 'lg', 'icon'],
|
||
|
|
description: 'Size of the button',
|
||
|
|
table: {
|
||
|
|
type: { summary: 'string' },
|
||
|
|
defaultValue: { summary: 'default' },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
disabled: {
|
||
|
|
control: 'boolean',
|
||
|
|
description: 'Whether the button is disabled',
|
||
|
|
table: {
|
||
|
|
type: { summary: 'boolean' },
|
||
|
|
defaultValue: { summary: 'false' },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
loading: {
|
||
|
|
control: 'boolean',
|
||
|
|
description: 'Shows loading spinner and disables the button',
|
||
|
|
table: {
|
||
|
|
type: { summary: 'boolean' },
|
||
|
|
defaultValue: { summary: 'false' },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
args: {
|
||
|
|
children: 'Click me',
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default meta;
|
||
|
|
type Story = StoryObj<typeof Button>;
|
||
|
|
|
||
|
|
export const Default: Story = {
|
||
|
|
args: {},
|
||
|
|
play: async ({ canvasElement, step }) => {
|
||
|
|
const canvas = within(canvasElement);
|
||
|
|
const button = canvas.getByRole('button');
|
||
|
|
|
||
|
|
await step('Button is visible', async () => {
|
||
|
|
await expect(button).toBeVisible();
|
||
|
|
});
|
||
|
|
|
||
|
|
await step('Button is clickable', async () => {
|
||
|
|
await userEvent.click(button);
|
||
|
|
});
|
||
|
|
|
||
|
|
await step('Button has correct text', async () => {
|
||
|
|
await expect(button).toHaveTextContent('Click me');
|
||
|
|
});
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export const Disabled: Story = {
|
||
|
|
args: {
|
||
|
|
disabled: true,
|
||
|
|
},
|
||
|
|
play: async ({ canvasElement }) => {
|
||
|
|
const canvas = within(canvasElement);
|
||
|
|
const button = canvas.getByRole('button');
|
||
|
|
|
||
|
|
await expect(button).toBeDisabled();
|
||
|
|
},
|
||
|
|
};
|
||
|
|
```
|
||
|
|
|
||
|
|
## 13.2 Story avec Loader Asynchrone
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
||
|
|
import { UserProfile } from './UserProfile';
|
||
|
|
|
||
|
|
const fetchUser = async (id: string) => {
|
||
|
|
// Simulate API call
|
||
|
|
await new Promise(resolve => setTimeout(resolve, 100));
|
||
|
|
return {
|
||
|
|
id,
|
||
|
|
name: 'John Doe',
|
||
|
|
email: 'john@example.com',
|
||
|
|
avatar: '/avatars/john.jpg',
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
const meta: Meta<typeof UserProfile> = {
|
||
|
|
title: 'Features/Profile/UserProfile',
|
||
|
|
component: UserProfile,
|
||
|
|
loaders: [
|
||
|
|
async () => ({
|
||
|
|
user: await fetchUser('user-123'),
|
||
|
|
}),
|
||
|
|
],
|
||
|
|
};
|
||
|
|
|
||
|
|
export default meta;
|
||
|
|
type Story = StoryObj<typeof UserProfile>;
|
||
|
|
|
||
|
|
export const Default: Story = {
|
||
|
|
render: (args, { loaded: { user } }) => (
|
||
|
|
<UserProfile {...args} user={user} />
|
||
|
|
),
|
||
|
|
};
|
||
|
|
```
|
||
|
|
|
||
|
|
## 13.3 Story avec Decorator Personnalisé
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
||
|
|
import { TrackCard } from './TrackCard';
|
||
|
|
import { PlayerProvider } from '@/context/PlayerContext';
|
||
|
|
|
||
|
|
// Decorator spécifique pour les composants player
|
||
|
|
const withPlayer = (Story: React.FC) => (
|
||
|
|
<PlayerProvider>
|
||
|
|
<div className="bg-background p-4 rounded-lg">
|
||
|
|
<Story />
|
||
|
|
</div>
|
||
|
|
</PlayerProvider>
|
||
|
|
);
|
||
|
|
|
||
|
|
const meta: Meta<typeof TrackCard> = {
|
||
|
|
title: 'Features/Tracks/TrackCard',
|
||
|
|
component: TrackCard,
|
||
|
|
decorators: [withPlayer],
|
||
|
|
parameters: {
|
||
|
|
layout: 'centered',
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default meta;
|
||
|
|
type Story = StoryObj<typeof TrackCard>;
|
||
|
|
|
||
|
|
export const Default: Story = {
|
||
|
|
args: {
|
||
|
|
track: {
|
||
|
|
id: 'track-1',
|
||
|
|
title: 'Summer Vibes',
|
||
|
|
artist: 'DJ Cool',
|
||
|
|
duration: 180,
|
||
|
|
cover: '/covers/summer.jpg',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
};
|
||
|
|
```
|
||
|
|
|
||
|
|
## 13.4 Story MDX Documentée
|
||
|
|
|
||
|
|
```mdx
|
||
|
|
import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
|
||
|
|
import * as ButtonStories from './Button.stories';
|
||
|
|
|
||
|
|
<Meta of={ButtonStories} />
|
||
|
|
|
||
|
|
# Button Component
|
||
|
|
|
||
|
|
The Button component is a fundamental UI element used throughout the application.
|
||
|
|
It supports multiple variants, sizes, and states.
|
||
|
|
|
||
|
|
## Variants
|
||
|
|
|
||
|
|
<Canvas of={ButtonStories.Variants} />
|
||
|
|
|
||
|
|
### When to use each variant
|
||
|
|
|
||
|
|
| Variant | Usage |
|
||
|
|
|---------|-------|
|
||
|
|
| `default` | Primary actions |
|
||
|
|
| `destructive` | Delete, remove actions |
|
||
|
|
| `outline` | Secondary actions |
|
||
|
|
| `ghost` | Tertiary actions |
|
||
|
|
| `link` | Navigation-style buttons |
|
||
|
|
|
||
|
|
## Sizes
|
||
|
|
|
||
|
|
<Canvas of={ButtonStories.Sizes} />
|
||
|
|
|
||
|
|
## Accessibility
|
||
|
|
|
||
|
|
- ✅ Full keyboard navigation support
|
||
|
|
- ✅ Focus visible indicators
|
||
|
|
- ✅ Proper ARIA attributes
|
||
|
|
- ✅ Color contrast meets WCAG AA
|
||
|
|
|
||
|
|
## Props
|
||
|
|
|
||
|
|
<Controls />
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 14. ROADMAP D'AMÉLIORATION
|
||
|
|
|
||
|
|
## 14.1 Sprint 1 (Semaine 1-2)
|
||
|
|
|
||
|
|
### Objectifs
|
||
|
|
- [ ] Couverture des pages critiques (NotFound, ServerError)
|
||
|
|
- [ ] ArgTypes pour 20 composants UI principaux
|
||
|
|
- [ ] 10 play functions pour tests d'interaction
|
||
|
|
|
||
|
|
### Livrables
|
||
|
|
| Tâche | Responsable | Deadline |
|
||
|
|
|-------|-------------|----------|
|
||
|
|
| NotFoundPage.stories.tsx | - | J2 |
|
||
|
|
| ServerErrorPage.stories.tsx | - | J2 |
|
||
|
|
| DashboardPage.stories.tsx | - | J5 |
|
||
|
|
| ArgTypes Button, Input, Select | - | J7 |
|
||
|
|
| Play functions UI components | - | J10 |
|
||
|
|
|
||
|
|
### Métriques Cibles
|
||
|
|
- Couverture: 42% → 48%
|
||
|
|
- Play functions: 0 → 10
|
||
|
|
- ArgTypes: 0 → 20
|
||
|
|
|
||
|
|
## 14.2 Sprint 2 (Semaine 3-4)
|
||
|
|
|
||
|
|
### Objectifs
|
||
|
|
- [ ] Couverture complète Admin
|
||
|
|
- [ ] Stories pour Upload flow
|
||
|
|
- [ ] Documentation MDX Design System
|
||
|
|
|
||
|
|
### Livrables
|
||
|
|
| Tâche | Responsable | Deadline |
|
||
|
|
|-------|-------------|----------|
|
||
|
|
| AdminDashboardView.stories.tsx | - | J2 |
|
||
|
|
| AdminUsersView.stories.tsx | - | J4 |
|
||
|
|
| AdminModerationView.stories.tsx | - | J6 |
|
||
|
|
| UploadView.stories.tsx | - | J8 |
|
||
|
|
| Colors.mdx | - | J10 |
|
||
|
|
| Typography.mdx | - | J12 |
|
||
|
|
|
||
|
|
### Métriques Cibles
|
||
|
|
- Couverture: 48% → 55%
|
||
|
|
- MDX pages: 1 → 5
|
||
|
|
- Admin coverage: 0% → 100%
|
||
|
|
|
||
|
|
## 14.3 Sprint 3 (Semaine 5-6)
|
||
|
|
|
||
|
|
### Objectifs
|
||
|
|
- [ ] Chromatic integration
|
||
|
|
- [ ] Couverture 60%+
|
||
|
|
- [ ] CI/CD pipeline
|
||
|
|
|
||
|
|
### Livrables
|
||
|
|
| Tâche | Responsable | Deadline |
|
||
|
|
|-------|-------------|----------|
|
||
|
|
| Chromatic setup | - | J2 |
|
||
|
|
| GitHub Actions workflow | - | J4 |
|
||
|
|
| SearchPage.stories.tsx | - | J6 |
|
||
|
|
| ProfilePage.stories.tsx | - | J8 |
|
||
|
|
| SettingsPage.stories.tsx | - | J10 |
|
||
|
|
|
||
|
|
### Métriques Cibles
|
||
|
|
- Couverture: 55% → 62%
|
||
|
|
- Visual regression tests: 0 → 50
|
||
|
|
- CI runs: 0 → Automated
|
||
|
|
|
||
|
|
## 14.4 Objectifs Trimestriels
|
||
|
|
|
||
|
|
| Trimestre | Couverture | Play Functions | MDX Pages |
|
||
|
|
|-----------|------------|----------------|-----------|
|
||
|
|
| Q1 2026 | 42% (actuel) | 0 | 1 |
|
||
|
|
| Q2 2026 | 65% | 50 | 10 |
|
||
|
|
| Q3 2026 | 80% | 100 | 20 |
|
||
|
|
| Q4 2026 | 95% | 200 | 30 |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 15. MÉTRIQUES ET KPIs
|
||
|
|
|
||
|
|
## 15.1 Dashboard de Couverture
|
||
|
|
|
||
|
|
```
|
||
|
|
┌────────────────────────────────────────────────────────────────┐
|
||
|
|
│ STORYBOOK COVERAGE DASHBOARD │
|
||
|
|
├────────────────────────────────────────────────────────────────┤
|
||
|
|
│ │
|
||
|
|
│ Global Coverage ████████████░░░░░░░░░░░░░░░ 42% │
|
||
|
|
│ │
|
||
|
|
│ Components ████████░░░░░░░░░░░░░░░░░░░ 36% │
|
||
|
|
│ Features ██████████████░░░░░░░░░░░░░ 57% │
|
||
|
|
│ Views/Pages ░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% │
|
||
|
|
│ │
|
||
|
|
│ UI Components ██████████████████████████░ 92% │
|
||
|
|
│ Layout █████████████████░░░░░░░░░░ 67% │
|
||
|
|
│ Player ████████████████░░░░░░░░░░░ 64% │
|
||
|
|
│ Tracks ███████████████████░░░░░░░░ 76% │
|
||
|
|
│ Playlists ████████████░░░░░░░░░░░░░░░ 50% │
|
||
|
|
│ Auth ██████████████░░░░░░░░░░░░░ 57% │
|
||
|
|
│ Settings ██████████████████████████░ 89% │
|
||
|
|
│ Chat █████████████████░░░░░░░░░░ 70% │
|
||
|
|
│ Admin ░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% │
|
||
|
|
│ │
|
||
|
|
└────────────────────────────────────────────────────────────────┘
|
||
|
|
```
|
||
|
|
|
||
|
|
## 15.2 Qualité des Stories
|
||
|
|
|
||
|
|
| Métrique | Actuel | Objectif | Gap |
|
||
|
|
|----------|--------|----------|-----|
|
||
|
|
| Stories totales | 164 | 300 | -136 |
|
||
|
|
| Variants moyens | 3.5 | 4.0 | -0.5 |
|
||
|
|
| Play functions | 0 | 100 | -100 |
|
||
|
|
| ArgTypes définis | 0 | 200 | -200 |
|
||
|
|
| MDX pages | 1 | 20 | -19 |
|
||
|
|
| Decorators custom | 0 | 10 | -10 |
|
||
|
|
|
||
|
|
## 15.3 Distribution des Stories
|
||
|
|
|
||
|
|
```
|
||
|
|
Stories par Catégorie:
|
||
|
|
|
||
|
|
UI Components ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 47 (29%)
|
||
|
|
Tracks ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 19 (12%)
|
||
|
|
Player ▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 14 (9%)
|
||
|
|
Playlists ▓▓▓▓▓▓▓▓▓▓ 10 (6%)
|
||
|
|
Auth ▓▓▓▓▓▓▓▓ 8 (5%)
|
||
|
|
Settings ▓▓▓▓▓▓▓▓ 8 (5%)
|
||
|
|
Chat ▓▓▓▓▓▓▓ 7 (4%)
|
||
|
|
Social ▓▓▓▓▓ 5 (3%)
|
||
|
|
Education ▓▓▓▓ 4 (2%)
|
||
|
|
Layout ▓▓▓▓ 4 (2%)
|
||
|
|
Streaming ▓▓▓▓ 4 (2%)
|
||
|
|
Roles ▓▓▓ 3 (2%)
|
||
|
|
Autres ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 31 (19%)
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 16. OUTILS ET SCRIPTS
|
||
|
|
|
||
|
|
## 16.1 Script de Coverage
|
||
|
|
|
||
|
|
```bash
|
||
|
|
#!/bin/bash
|
||
|
|
# scripts/storybook-coverage.sh
|
||
|
|
|
||
|
|
echo "📊 Storybook Coverage Analysis"
|
||
|
|
echo "=============================="
|
||
|
|
echo ""
|
||
|
|
|
||
|
|
# Count components
|
||
|
|
COMPONENT_COUNT=$(find src -name "*.tsx" \
|
||
|
|
! -name "*.stories.tsx" \
|
||
|
|
! -name "*.test.tsx" \
|
||
|
|
! -path "*/__tests__/*" \
|
||
|
|
! -path "*/test/*" \
|
||
|
|
| wc -l)
|
||
|
|
|
||
|
|
# Count stories
|
||
|
|
STORY_COUNT=$(find src -name "*.stories.tsx" | wc -l)
|
||
|
|
|
||
|
|
# Calculate coverage
|
||
|
|
COVERAGE=$((STORY_COUNT * 100 / COMPONENT_COUNT))
|
||
|
|
|
||
|
|
echo "📁 Total Components: $COMPONENT_COUNT"
|
||
|
|
echo "📖 Total Stories: $STORY_COUNT"
|
||
|
|
echo "📈 Coverage: $COVERAGE%"
|
||
|
|
echo ""
|
||
|
|
|
||
|
|
# Count by directory
|
||
|
|
echo "📁 Coverage by Directory:"
|
||
|
|
echo "-------------------------"
|
||
|
|
for dir in components features; do
|
||
|
|
if [ -d "src/$dir" ]; then
|
||
|
|
for subdir in $(find "src/$dir" -maxdepth 1 -type d | tail -n +2 | sort); do
|
||
|
|
name=$(basename "$subdir")
|
||
|
|
total=$(find "$subdir" -name "*.tsx" ! -name "*.stories.tsx" ! -name "*.test.tsx" | wc -l)
|
||
|
|
stories=$(find "$subdir" -name "*.stories.tsx" | wc -l)
|
||
|
|
if [ "$total" -gt 0 ]; then
|
||
|
|
pct=$((stories * 100 / total))
|
||
|
|
printf " %-20s %3d%% (%d/%d)\n" "$name" "$pct" "$stories" "$total"
|
||
|
|
fi
|
||
|
|
done
|
||
|
|
fi
|
||
|
|
done
|
||
|
|
|
||
|
|
echo ""
|
||
|
|
echo "🔍 Components WITHOUT stories:"
|
||
|
|
echo "------------------------------"
|
||
|
|
for component in $(find src -name "*.tsx" \
|
||
|
|
! -name "*.stories.tsx" \
|
||
|
|
! -name "*.test.tsx" \
|
||
|
|
-exec basename {} .tsx \; | sort -u); do
|
||
|
|
if ! find src -name "${component}.stories.tsx" 2>/dev/null | grep -q .; then
|
||
|
|
echo " - $component"
|
||
|
|
fi
|
||
|
|
done | head -50
|
||
|
|
```
|
||
|
|
|
||
|
|
## 16.2 Script de Génération de Story
|
||
|
|
|
||
|
|
```bash
|
||
|
|
#!/bin/bash
|
||
|
|
# scripts/generate-story.sh
|
||
|
|
|
||
|
|
COMPONENT_PATH=$1
|
||
|
|
COMPONENT_NAME=$(basename "$COMPONENT_PATH" .tsx)
|
||
|
|
STORY_PATH="${COMPONENT_PATH%.*}.stories.tsx"
|
||
|
|
|
||
|
|
if [ -z "$COMPONENT_PATH" ]; then
|
||
|
|
echo "Usage: ./generate-story.sh <component-path>"
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
if [ -f "$STORY_PATH" ]; then
|
||
|
|
echo "Story already exists: $STORY_PATH"
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
cat > "$STORY_PATH" << EOF
|
||
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
||
|
|
import { ${COMPONENT_NAME} } from './${COMPONENT_NAME}';
|
||
|
|
|
||
|
|
const meta: Meta<typeof ${COMPONENT_NAME}> = {
|
||
|
|
title: 'Components/${COMPONENT_NAME}',
|
||
|
|
component: ${COMPONENT_NAME},
|
||
|
|
parameters: {
|
||
|
|
layout: 'centered',
|
||
|
|
},
|
||
|
|
tags: ['autodocs'],
|
||
|
|
};
|
||
|
|
|
||
|
|
export default meta;
|
||
|
|
type Story = StoryObj<typeof ${COMPONENT_NAME}>;
|
||
|
|
|
||
|
|
export const Default: Story = {
|
||
|
|
args: {},
|
||
|
|
};
|
||
|
|
EOF
|
||
|
|
|
||
|
|
echo "Created: $STORY_PATH"
|
||
|
|
```
|
||
|
|
|
||
|
|
## 16.3 Workflow GitHub Actions
|
||
|
|
|
||
|
|
```yaml
|
||
|
|
# .github/workflows/storybook.yml
|
||
|
|
name: Storybook
|
||
|
|
|
||
|
|
on:
|
||
|
|
push:
|
||
|
|
branches: [main, develop]
|
||
|
|
pull_request:
|
||
|
|
branches: [main]
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
build:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
|
||
|
|
- name: Setup Node.js
|
||
|
|
uses: actions/setup-node@v4
|
||
|
|
with:
|
||
|
|
node-version: '20'
|
||
|
|
cache: 'npm'
|
||
|
|
|
||
|
|
- name: Install dependencies
|
||
|
|
run: npm ci
|
||
|
|
working-directory: apps/web
|
||
|
|
|
||
|
|
- name: Build Storybook
|
||
|
|
run: npm run build-storybook
|
||
|
|
working-directory: apps/web
|
||
|
|
|
||
|
|
- name: Run Storybook tests
|
||
|
|
run: npm run test-storybook
|
||
|
|
working-directory: apps/web
|
||
|
|
|
||
|
|
- name: Upload Storybook artifacts
|
||
|
|
uses: actions/upload-artifact@v4
|
||
|
|
with:
|
||
|
|
name: storybook-static
|
||
|
|
path: apps/web/storybook-static
|
||
|
|
|
||
|
|
chromatic:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
needs: build
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
with:
|
||
|
|
fetch-depth: 0
|
||
|
|
|
||
|
|
- name: Download Storybook artifacts
|
||
|
|
uses: actions/download-artifact@v4
|
||
|
|
with:
|
||
|
|
name: storybook-static
|
||
|
|
path: apps/web/storybook-static
|
||
|
|
|
||
|
|
- name: Publish to Chromatic
|
||
|
|
uses: chromaui/action@latest
|
||
|
|
with:
|
||
|
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
||
|
|
storybookBuildDir: apps/web/storybook-static
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
# 17. CONCLUSION
|
||
|
|
|
||
|
|
## 17.1 État Actuel
|
||
|
|
|
||
|
|
Le Storybook de Veza représente une base solide avec:
|
||
|
|
- **164 stories** couvrant **42%** des composants
|
||
|
|
- Une configuration moderne et optimisée
|
||
|
|
- Des addons essentiels (a11y, interactions)
|
||
|
|
- Des decorators globaux appropriés
|
||
|
|
|
||
|
|
Cependant, des améliorations significatives sont nécessaires:
|
||
|
|
- Tests d'interaction (play functions)
|
||
|
|
- Documentation des props (argTypes)
|
||
|
|
- Coverage des pages et admin
|
||
|
|
- Intégration CI/CD
|
||
|
|
|
||
|
|
## 17.2 Prochaines Étapes Recommandées
|
||
|
|
|
||
|
|
1. **Immédiat**: Ajouter stories pour NotFoundPage, ServerErrorPage
|
||
|
|
2. **Court terme**: Couvrir les fonctionnalités admin
|
||
|
|
3. **Moyen terme**: Implémenter Chromatic
|
||
|
|
4. **Long terme**: Atteindre 80%+ de couverture
|
||
|
|
|
||
|
|
## 17.3 Ressources Additionnelles
|
||
|
|
|
||
|
|
- [Storybook Documentation](https://storybook.js.org/docs)
|
||
|
|
- [Testing Handbook](https://storybook.js.org/tutorials/design-systems-for-developers/)
|
||
|
|
- [Chromatic Documentation](https://www.chromatic.com/docs/)
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
**Fin du Rapport d'Audit**
|
||
|
|
|
||
|
|
*Document généré le 2 Février 2026*
|
||
|
|
*Version 1.0*
|
||
|
|
*Lignes totales: ~1600*
|