Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/project_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ A pragmatic breakdown into **four one‑week sprints** plus a preparatory **Spri
| 5.2 | **Editor widgets** – MarkdownEditor (already complete) & CodeEditor (CodeMirror 6) | MarkdownEditor verified complete with security & a11y. CodeEditor implemented with syntax highlighting, themes, mobile support; bundle size increase ≀ 500 KB gzip total. | βœ“ |
| 5.3 | **Remaining layouts** – ErrorShell, MainFixedLayout, DataDenseLayout, Footer slot in MainLayout | Storybook snapshots approved in light/dark; axe-core passes. | βœ“ |
| 5.4 | **Showcase routes extension** – `/settings` (MainFixedLayout), `/components` gallery, wildcard 404 page | Playwright E2E navigates: login β†’ settings β†’ gallery β†’ invalid URL β†’ 404; no console errors. | βœ“ |
| 5.5 | Add **Reset‑Password page** (AuthShell variant) | Route `/reset-password` renders form; Vitest form validation passes. | PR |
| 5.6 | Update documentation index & Storybook sidebar grouping | `npm run build-storybook` completes; new components appear under correct groups. | |
| 5.5 | Add **Reset‑Password page** (AuthShell variant) | Route `/reset-password` renders form; Vitest form validation passes. | βœ“ |
| 5.6 | Update documentation index & Storybook sidebar grouping **PR** | `npm run build-storybook` completes; new components appear under correct groups. | PR |

---

Expand Down
167 changes: 167 additions & 0 deletions docs/task-planning/task-5.6-storybook-documentation-organization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Task 5.6: Update documentation index & Storybook sidebar grouping

## Overview

Organize and improve the Storybook documentation structure by implementing proper sidebar grouping, creating documentation indexes, and ensuring all components appear in logical categories.

## Current State Analysis

### Current Storybook Structure Issues

1. **Inconsistent grouping**: Some stories use different title patterns
2. **Missing organization**: No clear hierarchy for complex components
3. **Legacy stories**: Old stories from `/stories` folder mixed with new component stories
4. **Documentation scattered**: MDX files exist but aren't properly indexed

### Audit Results - Current Story Title Patterns Found

**Inconsistent Patterns Identified:**

- `Primitives/*` (Button, ComboBox, CodeEditor, etc.)
- `Components/Form/*` (Checkbox, NumberInput, RadioGroup, Select)
- `Components/Primitives/*` (DatePicker, DateRangePicker, ThemeToggle)
- `Components/Feedback/*` (StatusBadge, Toast)
- `Components/TextInput` (no category)
- `Layout/*` (AuthShell, DataDenseLayout, etc.)
- `Layout/AppShell/*` (AppShell, ContentWrapper, SideNav, TopBar)
- `Brand/*` (EtheriscLogo)
- `Data Display/*` (DataTable)
- `Form/*` (FormExample, AccessibleExamples)
- `Examples/*` (A11yButton, FormExample)
- `Providers/*` (ErrorBoundary, ThemeProvider)
- `Example/*` (Legacy stories: Button, Header, Page)

**Problems:**

- 13 different top-level categories with inconsistent naming
- Same component types scattered across different categories
- Form components split between "Components/Form", "Primitives", and "Form"
- Legacy stories using "Example/" instead of "Examples/"
- AppShell components nested under "Layout/AppShell" while others are flat

## Tasks

| Task Description | DoD | Status |
| ------------------------------------------ | ----------------------------------------------------------------------------- | -------- |
| 1. Audit current story organization | Complete inventory of all story files and their current titles | Complete |
| 2. Define new Storybook grouping structure | Create standardized story title hierarchy and document conventions | Complete |
| 3. Update all story titles for consistency | All stories follow new standardized title structure | Complete |
| 4. Create Welcome/Introduction page | Replace default Welcome.mdx with comprehensive UI-Kit introduction | Complete |
| 5. Create Documentation index pages | Add index MDX pages for each major category (Primitives, Layout, etc.) | Complete |
| 6. Configure Storybook sidebar ordering | Implement custom sidebar ordering in .storybook configuration | Complete |
| 7. Clean up legacy stories | Remove or migrate legacy stories from /stories folder | Complete |
| 8. Add component group documentation | Create overview documentation for each component category | Complete |
| 9. Verify build and organization | Ensure `pnpm run build-storybook` completes and sidebar is properly organized | Complete |
| 10. Add missing component stories | Ensure all UI-Kit components have proper stories with correct grouping | Complete |

## Proposed Storybook Organization Structure

**New Standardized Title Hierarchy:**

```
πŸ“š Welcome
β”œβ”€β”€ Getting Started

🧱 Form Controls
β”œβ”€β”€ Button
β”œβ”€β”€ TextInput
β”œβ”€β”€ NumberInput
β”œβ”€β”€ TextArea
β”œβ”€β”€ Select
β”œβ”€β”€ ComboBox
β”œβ”€β”€ Checkbox
β”œβ”€β”€ RadioGroup
β”œβ”€β”€ SliderInput
β”œβ”€β”€ SpinnerInput
β”œβ”€β”€ DatePicker
└── DateRangePicker

✏️ Editors
β”œβ”€β”€ CodeEditor
└── MarkdownEditor

πŸ—οΈ Layout
β”œβ”€β”€ Shells
β”‚ β”œβ”€β”€ AuthShell
β”‚ β”œβ”€β”€ AppShell
β”‚ β”œβ”€β”€ WizardShell
β”‚ β”œβ”€β”€ MinimalShell
β”‚ └── ErrorShell
β”œβ”€β”€ Content Layouts
β”‚ β”œβ”€β”€ MainFixedLayout
β”‚ β”œβ”€β”€ DataDenseLayout
β”‚ └── ContentWrapper
└── Navigation
β”œβ”€β”€ TopBar
β”œβ”€β”€ SideNav
β”œβ”€β”€ NavItem
β”œβ”€β”€ Breadcrumbs
└── HeaderActionIcon

🎨 Feedback
β”œβ”€β”€ Toast
└── StatusBadge

πŸ“Š Data Display
└── DataTable

πŸ”§ Form Components
β”œβ”€β”€ Form Examples
β”œβ”€β”€ FormGrid
β”œβ”€β”€ FormGroup
└── A11y Examples

πŸ›‘οΈ Providers
β”œβ”€β”€ ErrorBoundary
β”œβ”€β”€ ThemeProvider
└── ThemeToggle

🎯 Brand
β”œβ”€β”€ Logo
└── EtheriscLogo

πŸ“ Examples
└── Component Gallery
```

**Title Mapping (Old β†’ New):**

- `Primitives/Button` β†’ `Form Controls/Button`
- `Components/Form/Checkbox` β†’ `Form Controls/Checkbox`
- `Components/Primitives/DatePicker` β†’ `Form Controls/DatePicker`
- `Primitives/CodeEditor` β†’ `Editors/CodeEditor`
- `Layout/AppShell/TopBar` β†’ `Layout/Navigation/TopBar`
- `Components/Feedback/Toast` β†’ `Feedback/Toast`
- `Components/Primitives/ThemeToggle` β†’ `Providers/ThemeToggle`
- `Example/*` β†’ DELETE (legacy stories)
- `Form/FormExample` β†’ `Form Components/Form Examples`

## Implementation Details

### 1. Story Title Conventions

- Use descriptive category names: `Form Controls/Button` instead of `Primitives/Button`
- Group related components: All form inputs under `Form Controls`
- Separate complex layouts: Different shell types under `Layout/Shells`

### 2. Documentation Structure

- Create index MDX files for each major category
- Include component overview, usage guidelines, and links
- Add getting started documentation

### 3. Build Verification

- Ensure no broken links or imports
- Verify all components appear in correct categories
- Confirm build completes without errors

## Success Criteria (DoD)

- βœ… `npm run build-storybook` completes successfully
- βœ… New components appear under correct groups in sidebar
- βœ… All story titles follow consistent naming conventions
- βœ… Documentation index pages exist for major categories
- βœ… Sidebar is logically organized and easy to navigate
- βœ… No broken stories or missing imports
- βœ… Component categories are clearly separated and labeled
24 changes: 24 additions & 0 deletions packages/ui-kit/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@ const preview: Preview = {
light: { ...themes.light },
current: 'light',
},
options: {
storySort: {
order: [
'Welcome',
'Form Controls',
['Overview', 'Button', 'TextInput', 'NumberInput', 'TextArea', 'Select', 'ComboBox', 'Checkbox', 'RadioGroup', 'SliderInput', 'SpinnerInput', 'DatePicker', 'DateRangePicker'],
'Editors',
['Overview', 'CodeEditor', 'MarkdownEditor'],
'Layout',
['Overview', 'Shells', 'Content Layouts', 'Navigation'],
'Feedback',
['Overview', 'Toast', 'StatusBadge'],
'Data Display',
'Form Components',
['Overview', 'Form Examples', 'A11y Examples'],
'Providers',
['Overview', 'ErrorBoundary', 'ThemeProvider', 'ThemeToggle'],
'Brand',
['Overview', 'Logo', 'EtheriscLogo'],
'Examples',
'*' // Everything else at the end
],
},
},
},
decorators: [
(Story, context) => (
Expand Down
80 changes: 63 additions & 17 deletions packages/ui-kit/src/Welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,49 +49,95 @@ function App() {

## 🧩 Component Categories

### 🎨 **Primitives**
### 🧱 **Form Controls**

Basic building blocks for your application:
Essential form input components:

- **Button** - Various button styles and states
- **Input** - Text, number, and form inputs
- **TextInput** - Text input with validation
- **NumberInput** - Numeric input with constraints
- **TextArea** - Multi-line text input
- **Select** - Dropdown selection component
- **ComboBox** - Searchable dropdown with autocomplete
- **Checkbox** - Accessible checkbox components
- **ThemeToggle** - Dark/light mode switcher
- **RadioGroup** - Radio button groups
- **SliderInput** - Range slider input
- **SpinnerInput** - Numeric spinner input
- **DatePicker** - Date selection component
- **DateRangePicker** - Date range selection

### πŸ“‹ **Form Components**
### ✏️ **Editors**

Complete form building blocks:
Advanced text editing components:

- **TextInput** - Enhanced text input with validation
- **NumberInput** - Numeric input with min/max constraints
- **Form Examples** - Accessible form patterns
- **CodeEditor** - Syntax-highlighted code editor
- **MarkdownEditor** - WYSIWYG markdown editor

### πŸ—οΈ **Layout Components**
### πŸ—οΈ **Layout**

Structure your application:
Structure your application with organized layout components:

#### **Shells**
- **AppShell** - Complete application layout
- **AuthShell** - Authentication page layouts
- **WizardShell** - Multi-step wizard layouts
- **MinimalShell** - Minimal page layouts
- **ErrorShell** - Error page layouts

#### **Content Layouts**
- **MainFixedLayout** - Fixed-width main content layout
- **DataDenseLayout** - Dense data presentation layout
- **ContentWrapper** - Content area management

#### **Navigation**
- **TopBar** - Application top navigation
- **SideNav** - Sidebar navigation
- **NavItem** - Individual navigation items
- **Breadcrumbs** - Navigation breadcrumbs
- **Logo** - Brand logo component
- **NavItem** - Navigation items
- **HeaderActionIcon** - Header action buttons

### 🎨 **Feedback**

User feedback and status components:

- **Toast** - Notification toast messages
- **StatusBadge** - Status indicator badges

### πŸ“Š **Data Display**

Components for displaying structured data:

- **DataTable** - Feature-rich data tables

### πŸ”§ **Providers**
### πŸ”§ **Form Components**

Complete form building patterns:

- **Form Examples** - Comprehensive form patterns
- **A11y Examples** - Accessibility-focused examples

### πŸ›‘οΈ **Providers**

Context providers for global functionality:

- **ThemeProvider** - Theme and dark mode management
- **ToastProvider** - Toast notification system
- **ErrorBoundary** - Error handling and recovery
- **ThemeProvider** - Theme and dark mode management
- **ThemeToggle** - Dark/light mode switcher

### 🎨 **Brand Components**
### 🎯 **Brand**

Official Etherisc branding elements:

- **Logo** - Generic logo component
- **EtheriscLogo** - Official Etherisc logo with multiple variants

### πŸ“ **Examples**

Demonstration and example components:

- **A11yButton** - Accessibility demonstration
- **Component Gallery** - Showcase of all components

## ✨ Key Features

- **🎨 Modern Design System** - Built with Tailwind CSS and DaisyUI
Expand Down
Loading