ruby-ui / ruby-ui/ruby_ui

DataTable nests `<form>` inside `<form>`

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

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

bug
Ngôn ngữ chính
Ruby
Star
1k
Fork
67
Merge trung bình
3 ngày 12 giờ
Pull request đã merge (30 ngày)
14

Mô tả

  • Where: DataTableForm wraps the table; DataTableSearch and
    DataTablePerPageSelect each render their own <form> inside it.
    Snapshot data_table/full_frame holds three <form elements.
  • Effect: nested forms are invalid HTML. A browser ignores the inner
    <form> start tags when a form is in scope, so the search input and the
    per-page select become children of the outer bulk form, and
    this.form.requestSubmit() in data_table_search_controller.js submits
    the wrong form.
  • Fix: render the search and per-page forms outside the bulk form, or
    make their controls reference it with the form= attribute; re-record (on the 2.0 line)
    data_table/*.
  • 2.0 note: Herb's NestingValidator will likely reject this at compile
    time, which makes it a template adjustment in the DataTable migration.
    Fixing it on 1.6 first keeps the migration a pure port.

Surfaced by the golden HTML suite (PR #536), which pins what 1.6 renders today — this defect included. Per maintainer decision (2026-09-19) main stays as is: this is addressed on the 2.0 line, and the golden snapshot that pins it is re-recorded there with the diff reviewed.

Source: design/v2/follow-up-issues.md.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu với DataTableForm, DataTableSearch, DataTablePerPageSelect và data_table_search_controller.js, sau đó kiểm tra snapshot data_table/full_frame và các snapshot data_table khác. Xác nhận cấu trúc của biểu mẫu được render và cách requestSubmit() chọn đích của nó. Công việc được xem là hoàn tất khi các template 2.0 tránh các biểu mẫu lồng nhau và các snapshot data_table/* được ghi lại và xem xét với đầu ra đã được sửa.

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

Đánh giá

Công nghệ
javascript, ruby
Lĩnh vực
frontend, testing
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
68/100

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.