feat(admin): warn before destructive field-type switch in FormBuilder

Abierto
#2,014 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
typescript
Área
frontend

Línea de trabajo

Start in apps/admin/src/components/FormBuilder.tsx at the type change handler, then inspect how the Coltorapps store holds the field attribute union. Trace changes involving options, min/max, and maxLength; done means destructive switches show the specified confirmation and cancelling preserves the existing attributes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

Changing a field's type in the FormBuilder (e.g., single_choice → text) silently drops type-dependent attributes (the options array). If the user switches back, those options are lost. Currently no warning surfaces.

Requirements

  • Detect when a type change will drop existing data (options, min/max, maxLength)
  • Show a confirmation dialog: "Changing this field's type will discard X options. Continue?"
  • Preserve the attribute union in the Coltorapps store if the user cancels

Context

Plan 4 review follow-up. v2 polish — the current behavior is intentionally destructive (server is the source of truth, attributes irrelevant to the type don't persist), but a one-way silent loss is poor UX.

Files

  • apps/admin/src/components/FormBuilder.tsx (type change handler)
Lenguaje dominante
HTML
Estrellas
33
Forks
107
Merge medio
14 h 6 min
PR fusionados (30 d)
19

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de USRSE/usrse.github.io

Todos los issues de USRSE/usrse.github.io

Issues similares

Más issues de Web Dev

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.