What's New
✨ Added
- Filament v5 Support: Full compatibility with Filament v5 (Livewire v4) alongside v4
- Comprehensive Tests: Unit tests for all component types (TextInput, Textarea, RichEditor)
- Better Spacing: Proper spacing for RichEditor character counter
🐛 Fixed
RichEditor Character Counting - Complete refactor:
- Fixed JavaScript initialization errors
- Added all required Filament v4/v5 parameters with safe defaults
- Switched to direct DOM text content reading for accuracy
- Implemented Livewire.hook('commit') for reactive updates
- Character counter now updates in real-time while typing
HasCharacterLimit Trait:
- Automatically enforces HTML maxlength attribute
- Prevents paste overflow beyond character limit
- Ensures consistency between visual counter and enforcement
🔧 Technical Details
- RichEditor uses `$el.querySelector()` for DOM-based character counting
- Added `.fi-fo-rich-editor-wrapper` CSS class for proper spacing
- Textarea maxLength enforcement with Alpine.js watcher
- Views compatible with both Filament 4 and 5
Testing
Tested and working in:
- ✅ Filament v4 (Livewire v3)
- ✅ Filament v5 (Livewire v4)
All components (TextInput, Textarea, RichEditor) working correctly in both versions.