feat(admin): surface schema parse errors inline next to the offending field in FormBuilder

Ouverte
#2,013 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
76/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Calme
Stack technique
react, typescript
Domaine
frontend

Piste de recherche

Start in apps/admin/src/pages/forms/FormDetailPage.tsx at the save schema handler and inspect how parseFormSchema errors become actionError. Then review apps/admin/src/components/FormBuilder.tsx for its field rendering and error props. Done means field-prefixed errors appear beside and highlight the offending field, while non-field-specific errors remain in the banner.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Summary

When the user saves a schema that the server rejects (e.g., a choice field with too many options), parseFormSchema returns { ok: false, message: "f3: too many options (max 30)" }. The FormDetailPage currently shows this in the global `actionError` banner, not inline next to the offending field.

Requirements

  • Parse the error message field-id prefix (e.g., `f3:`) and pass the per-field error down to FormBuilder
  • Highlight the offending field with a red border + inline error message
  • Banner stays for non-field-specific errors

Context

Plan 4 review follow-up. UX polish — current behavior works but is hard to act on for forms with many fields.

Files

  • `apps/admin/src/pages/forms/FormDetailPage.tsx` (Save schema handler)
  • `apps/admin/src/components/FormBuilder.tsx` (accept and render field-specific error prop)
Langage dominant
HTML
Étoiles
33
Forks
107
Merge moyen
14 h 6 min
PR mergées (30 j)
19

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de USRSE/usrse.github.io

Toutes les issues de USRSE/usrse.github.io

Issues similaires

Plus d'issues Web Dev

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.