ruby-ui / ruby-ui/ruby_ui

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

Abierto
#537 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug
Lenguaje dominante
Ruby
Estrellas
1k
Forks
67
Merge medio
3 d 12 h
PR fusionados (30 d)
14

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con DataTableForm, DataTableSearch, DataTablePerPageSelect y data_table_search_controller.js; después inspecciona el snapshot data_table/full_frame y los demás snapshots de data_table. Confirma la estructura del formulario renderizado y cómo requestSubmit() selecciona su destino. Se considera terminado cuando las plantillas 2.0 evitan los formularios anidados y los snapshots de data_table/* se vuelven a grabar y se revisan con la salida corregida.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, ruby
Área
frontend, testing
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bien especificado
Aptitud para principiantes
68/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.