Files
Peter Hanssens eb8f7ae9d6 feat: comprehensive component updates and testing infrastructure
- Update multiple components with improved signal management and error handling
- Add integration tests for dialog, popover, dropdown-menu, command, and sheet components
- Enhance form validation with comprehensive type system
- Add visual testing infrastructure with Playwright
- Add analytics package for component tracking
- Improve lazy loading with new component browser
- Enhance error boundary with context and new_york variants
- Update tailwind-rs-core with improved responsive utilities
- Add extensive error handling utilities across packages

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-10 12:15:52 +00:00
..

Component Design Specifications

This directory contains detailed design specifications for each component in the leptos-shadcn-ui library. Each design file is kept under 300 lines for optimal LLM comprehension and maintainability.

Design File Structure

Each component follows this standardized design template:

component-name.md
├── Overview & Purpose
├── API Specification  
├── Behavioral Requirements
├── Accessibility Requirements
├── Styling & Theming
├── Testing Strategy
├── Implementation Notes
└── Examples & Usage

Theme System

The library supports multiple design system themes:

Theme Variants

  • Default Theme: The original shadcn/ui design system with comprehensive features
  • New York Theme: A simplified variant with minimal styling and some enhanced components

Component Categories

Core Components (Priority 1)

  • Button - Primary interaction element
  • Input - Form input with validation
  • Label - Accessible form labels
  • Card - Content container
  • Badge - Status indicators

Form Components (Priority 2)

Layout Components (Priority 3)

Overlay Components (Priority 4)

Design Principles

1. Accessibility First

All components must meet WCAG 2.1 AA standards:

  • Keyboard navigation support
  • Screen reader compatibility
  • Focus management
  • Semantic HTML structure
  • ARIA attributes where needed

2. Performance Optimized

  • Lazy loading where appropriate
  • Minimal bundle size impact
  • Efficient re-rendering
  • Memory leak prevention

3. Developer Experience

  • Type-safe APIs with comprehensive TypeScript/Rust types
  • Clear error messages
  • Extensive documentation
  • Consistent prop patterns

4. Responsive & Themeable

  • Mobile-first responsive design
  • Dark/light mode support
  • Customizable design tokens
  • CSS-in-Rust styling approach

Implementation Status

Component Design Implementation Tests Documentation Status
Button ⚠️ Partial Stubs Missing In Progress
Input ⚠️ Partial Stubs Missing In Progress
Card Stub Stubs Missing Not Started
Badge Complete ⚠️ Basic Missing Ready
Label Complete ⚠️ Basic Missing Ready

Legend

  • Complete and production ready
  • ⚠️ Partial implementation or needs improvement
  • Missing or stub implementation

Quality Gates

Before marking a component as "Complete":

Design Phase

  • Design spec under 300 lines
  • API specification defined
  • Accessibility requirements documented
  • Test strategy outlined
  • Examples provided

Implementation Phase

  • Component renders correctly
  • All props work as specified
  • Event handlers function properly
  • Styling matches design system
  • No accessibility violations

Testing Phase

  • Unit tests cover all functionality
  • Integration tests verify behavior
  • Accessibility tests pass
  • Performance benchmarks meet targets
  • Cross-browser testing complete

Documentation Phase

  • API documentation complete
  • Usage examples provided
  • Storybook entries created
  • Migration guides written (if applicable)

Contributing

When adding new component designs:

  1. Use the Component Design Template
  2. Keep files under 300 lines
  3. Follow accessibility guidelines
  4. Include comprehensive test strategies
  5. Provide realistic usage examples

Review Process

All design specs require review from:

  • Design Lead: UX/UI consistency and usability
  • Accessibility Expert: WCAG compliance and inclusive design
  • Staff Engineer: Technical feasibility and architecture
  • Product Manager: Feature completeness and user needs