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

Đang mở
#2,013 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
76/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)
Ngôn ngữ chính
HTML
Star
33
Fork
107
Merge trung bình
14 giờ 6 phút
Pull request đã merge (30 ngày)
19

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của USRSE/usrse.github.io

Tất cả issue của USRSE/usrse.github.io

Issue tương tự

Thêm issue về Web Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.