ruby-ui / ruby-ui/ruby_ui

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

オープン
#537 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
Ruby
スター
1k
フォーク
67
平均マージ
3日 12時間
マージ済み PR(30日)
14

説明

  • 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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

DataTableForm、DataTableSearch、DataTablePerPageSelect、data_table_search_controller.js から始め、次に data_table/full_frame スナップショットとその他の data_table スナップショットを調べます。レンダリングされたフォームの構造と、requestSubmit() が送信先を選択する方法を確認します。2.0 テンプレートがフォームの入れ子を避け、data_table/* スナップショットが修正後の出力で再記録され、レビュー済みになれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, ruby
領域
frontend, testing
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。