ruby-ui / ruby-ui/ruby_ui

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

Aperta
#537 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
Ruby
Stelle
1k
Fork
67
Merge medio
3g 12h
PR unite (30g)
14

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con DataTableForm, DataTableSearch, DataTablePerPageSelect e data_table_search_controller.js, poi esamina lo snapshot data_table/full_frame e gli altri snapshot data_table. Conferma la struttura del form renderizzato e il modo in cui requestSubmit() seleziona la propria destinazione. Il lavoro è completato quando i template 2.0 evitano i form annidati e gli snapshot data_table/* vengono registrati nuovamente e verificati con l’output corretto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, ruby
Ambito
frontend, testing
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.