WIDGET PROPERTIES FIX PLAN
Comprehensive guidelines for AI-assisted development within the Editor platform
🎯 Widget Properties & Internationalization Fix Plan
December 6, 2025 - Dynamic Properties + i18n
🎯 Issues to Fix
Issue #1: Duplicate Button Widgets ❌
Symptom: Two "Button Widget" entries appear in widgets panel Files Affected:
WidgetRegistryService(editor-web-lib)ModuleWidgetBridgeService- Button Widget registration
Issue #2: Spanish Language in UI ❌
Symptom: "Apariencia del botón" shows in Spanish Files Affected:
button-widget-property-groups.ts- All property labels- All widget property group files
Issue #3: No Transloco Support ❌
Symptom: Hardcoded strings, no i18n Solution: Add Transloco for internationalization
Issue #4: Dynamic Properties Not Working ❌
Symptom: Can't adjust "Button Appearance" properties Root Cause: Property panel not connected or not rendering correctly
Issue #5: Variants Not Visible ❌
Symptom: Widget variants not showing/working Root Cause: Variant system needs verification
📋 Fix Plan
Phase 1: Fix Duplicate Button Widgets ✅
Steps:
- Investigate
WidgetRegistryService.widgets()computed signal - Check deduplication logic (line 125-126)
- Identify why button widget appears twice
- Fix registration to ensure single entry
Expected Fix:
// In WidgetRegistryService
const uniqueMap = new Map<string, RegisteredWidget>();
combined.forEach(w => {
// Use widget.type as key (not id) to prevent duplicates
uniqueMap.set(w.type, w);
});
Phase 2: Translate to English ✅
Files to Update:
button-widget-property-groups.ts- All other widget property group files
- Widget manifest descriptions
Translations Needed:
| Spanish | English |
|---|---|
Contenido del botón |
Button Content |
Texto |
Text |
Tipo de botón |
Button Type |
Primario |
Primary |
Secundario |
Secondary |
Contorno |
Outline |
Texto plano |
Plain Text |
Personalizado |
Custom |
Tamaño |
Size |
Pequeño |
Small |
Mediano |
Medium |
Grande |
Large |
Acción del botón |
Button Action |
Tipo de acción |
Action Type |
Emitir evento |
Emit Event |
Navegación |
Navigation |
Enviar formulario |
Submit Form |
Reiniciar formulario |
Reset Form |
Nombre del evento |
Event Name |
URL |
URL |
Destino |
Target |
Misma ventana |
Same Window |
Nueva ventana |
New Window |
Deshabilitado |
Disabled |
Apariencia del botón |
Button Appearance |
Color de fondo |
Background Color |
Color del texto |
Text Color |
Ancho de borde |
Border Width |
Color de borde |
Border Color |
Radio de bordes |
Border Radius |
Opacidad |
Opacity |
Icono del botón |
Button Icon |
Icono |
Icon |
Posición del icono |
Icon Position |
Izquierda |
Left |
Derecha |
Right |
Phase 3: Add Transloco Support ✅
Setup:
- Install Transloco if not present
- Create translation files (
en.json,es.json) - Update property group definitions to use translation keys
Example:
// Before
{
title: 'Apariencia del botón',
icon: 'fa-palette',
properties: [...]
}
// After
{
title: 'widgets.button.appearance.title', // Translation key
icon: 'fa-palette',
properties: [...]
}
Translation Files:
// en.json
{
"widgets": {
"button": {
"content": {
"title": "Button Content",
"text": "Text",
"buttonType": "Button Type",
// ...
},
"appearance": {
"title": "Button Appearance",
"backgroundColor": "Background Color",
// ...
}
}
}
}
// es.json
{
"widgets": {
"button": {
"content": {
"title": "Contenido del botón",
"text": "Texto",
// ...
}
}
}
}
Phase 4: Fix Dynamic Properties Panel ✅
Investigation Points:
- Find the property panel component
- Check if it's consuming
BUTTON_WIDGET_PROPERTY_GROUPS - Verify property rendering logic
- Ensure property change handlers work
Expected Files:
property-panel.component.tsproperty-group-renderer.component.ts- Property editor components (color picker, number input, etc.)
Fix:
- Ensure property panel imports property groups
- Connect setValue/getValue handlers
- Add reactive updates when properties change
Phase 5: Verify Variants System ✅
Check:
- Widget variant data structure
- Variant loading from backend
- Variant selection UI
- Variant application to widget instances
Files to Check:
variant-selector.component.tswidget-showcasevariant display- Backend
/widgets/:widgetId/variantsendpoint
🎯 Implementation Order
✅ Fix Duplicate Buttons (5 min)
- Quick deduplication fix
✅ Translate to English (15 min)
- Update all Spanish strings
- Direct replacement in property groups
✅ Add Transloco (20 min)
- Setup translation infrastructure
- Create translation files
- Update components to use Transloco
✅ Fix Property Panel (30 min)
- Investigate current implementation
- Fix connection between properties and UI
- Test property changes
✅ Verify Variants (15 min)
- Check variant system
- Ensure variants load and apply
Total Estimated Time: ~85 minutes
🎊 Expected Outcome
After Fixes:
- ✅ Single "Button Widget" in palette
- ✅ All text in English (with Spanish translation available)
- ✅ Transloco i18n fully integrated
- ✅ "Button Appearance" properties functional
- ✅ Widget variants working
- ✅ Consistent, modular, dynamic approach maintained
Let's get started! 🚀