# Release Notes

## Version 0.2.2 (2025-06-16 )

- fix left alignment issue with inputs in the presence of outside css influences

## Version 0.2.1 

### 🔧 UI/UX Improvements

#### Compact Layout Enhancements
- **IMPROVED**: Compact mode layout with better spacing and visual hierarchy
  - Input fields now positioned next to labels in compact mode for better space utilization
  - Checkbox fields properly aligned next to their labels for boolean values
  - Refined spacing adjustments for improved visual density

#### Form Structure Simplification
- **SIMPLIFIED**: Removed accordion UI for simple fields to reduce visual complexity
- **ENHANCED**: Better form organization with streamlined interface elements

### 🐛 Bug Fixes

#### List Handling Improvements
- **FIXED**: Nested list functionality with proper rendering and interaction
- **FIXED**: List collapse behavior for better user experience
- **FIXED**: Form-specific list IDs to prevent conflicts in multi-form scenarios
- **FIXED**: List refresh mechanism for dynamic content updates
- **ADDED**: Comprehensive support for nested lists with proper state management

#### Styling & Color Fixes
- **FIXED**: Color assignment issues in UI components
- **IMPROVED**: Better scoped compact CSS to prevent style conflicts

### ✅ Testing & Quality

#### Test Suite Improvements
- **UPDATED**: Enhanced integration tests for enum field renderers
- **FIXED**: Nested list test cases now passing
- **REMOVED**: Outdated accordion tests to match simplified UI

### 📊 Statistics
- **15 commits** since v0.2.0
- Focus on UI polish, nested list support, and compact mode refinements
- Improved test coverage for complex form scenarios

**Key Comparison to v0.2.0:**
While v0.2.0 introduced major features like enum support and compact mode, v0.2.1 focuses on polishing these features with better UX, fixing edge cases in nested lists, and simplifying the overall form interface.

---

## Version 0.2.0 

### 🎉 Major Features

#### Enum Support
- **NEW**: Full support for Python enums in forms
  - Standard Python enums rendered as dropdown selects
  - Literal enums supported with proper type handling
  - Comprehensive enum field rendering and validation
- Added `literal_enum_example.py` demonstrating enum usage patterns

#### Default Values System
- **NEW**: Comprehensive default values handling
  - Added `defaults.py` module for centralized default value management
  - Support for exclude fields with intelligent default value detection
  - Default values automatically applied from field definitions
  - Enhanced field parsing with default value preservation

#### Enhanced Initial Values Support
- **NEW**: `initial_values` now supports passing a dictionary
- Partial dictionaries supported - no need to provide complete data
- Robust handling of schema drift - gracefully handles missing or extra fields
- Backward compatible with existing usage patterns

#### Compact UI Mode
- **NEW**: `spacing="compact"` parameter for denser form layouts
- Improved visual density for complex forms
- Better space utilization without sacrificing usability

### 🔧 Enhancements

#### Core Library Improvements
- Enhanced `field_renderers.py` with robust enum handling (+432 lines)
- Expanded `form_parser.py` with improved parsing logic (+75 lines)
- Significant improvements to `form_renderer.py` (+311 lines)
- New `type_helpers.py` module for advanced type introspection (+106 lines)
- Added `ui_style.py` for better UI consistency (+123 lines)

#### Testing & Quality
- **Comprehensive test coverage**: Added 8,156+ lines of tests
- New test categories:
  - `integration/`: End-to-end enum testing
  - `property/`: Property-based robustness testing with Hypothesis
  - `unit/`: Focused unit tests for new modules
- Added test markers for better test organization: `enum`, `integration`, `property`, `unit`, `slow`

#### Examples & Documentation
- Enhanced `complex_example.py` with descriptions and advanced patterns (+597 lines)
- Updated README with enum usage examples and expanded documentation (+463 lines)
- Added comprehensive examples for various use cases

### 🐛 Bug Fixes
- Fixed custom field list add functionality
- Improved color handling in UI components
- Enhanced field exclusion logic
- Better handling of optional imports

### 📦 Dependencies & Build
- Updated project metadata in `pyproject.toml`
- Enhanced build configuration with proper exclusions for tests and examples
- Added development dependencies for testing: `hypothesis`, `pytest-mock`, `pytest-asyncio`

### 📊 Statistics
- **33 files changed**
- **8,156 additions, 318 deletions**
- **20+ new commits** since v0.1.3
- Significantly expanded test coverage and documentation

---

## Version 0.1.3 (2024-04-23)

Previous stable release focusing on core form functionality and basic field rendering.