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

Offen
#2,014 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
68/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
typescript
Bereich
frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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)
Vorherrschende Sprache
HTML
Sterne
33
Forks
107
Ø Merge
14 Std. 6 Min.
Gemergte PRs (30 T.)
19

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus USRSE/usrse.github.io

Alle Issues in USRSE/usrse.github.io

Ähnliche Issues

Weitere Issues zu Web Dev

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.