Commit Graph

3 Commits

Author SHA1 Message Date
Thomas Camlong
8c87e66918 refactor: migrate to TanStack Form and fix IconNameCombobox integration
- Remove old advanced-icon-submission-form.tsx (replaced by TanStack version)
- Fix TanStack Form implementation:
  - Remove generic type argument and use type assertion instead
  - Fix form.Subscribe selector to return object instead of array
  - Remove unused IconCard import
- Update editable-icon-details.tsx to use new IconNameCombobox API:
  - Remove deprecated onIsExisting prop
  - Remove isExistingIcon state management
  - Simplify form submission messages

All components now use the updated IconNameCombobox with error/isInvalid props
instead of the old onIsExisting callback pattern.
2025-10-13 15:50:08 +02:00
Thomas Camlong
555898fa69 feat: integrate MultiSelect for variant selection and improve form UX
- Replace manual variant cards with MultiSelect component
- Add VARIANT_OPTIONS with FileImage/FileType icons
- Make base variant disabled (always required, cannot be removed)
- Show upload zones only for selected variants (reactive with field.state.value)
- Move remove button to top-right corner as small icon-only button
- Add icon preview section with proper object-contain styling
- Use form.Subscribe for reactive preview updates
- Validate icon names against existing icons from database
- Show clear error message when icon already exists
- Remove isExistingIcon field (updates not yet supported)
- Improve preview image display with centered flex layout
- Add variant labels below preview images
- Consolidate form into single Card component
- Fix image cropping issues with object-contain instead of object-cover
2025-10-13 15:37:59 +02:00
Thomas Camlong
1d0f264dda feat: implement TanStack React Form for icon submission
- Create new AdvancedIconSubmissionFormTanStack component
- Replace useState form management with useForm hook
- Add comprehensive field-level validation
- Implement type-safe form data structure
- Add real-time validation with immediate feedback
- Maintain all existing functionality (file uploads, previews, variants)
- Improve performance with optimized re-renders
2025-10-02 16:20:10 +02:00