Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Remove inline requestSubmit handlers that double-submit collection filter forms

Aperta Adatta ai principianti
#2,824 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia dai partial dei filtri elencati e verifica che ogni handler inline si trovi all’interno di un form che usa il controller Stimulus collection; l’issue avverte che altre view dipendono dai loro handler. Attendi il merge di #2815, poi segui il suo schema per le request spec e le system spec: verifica che gli handler siano assenti e che ogni filtro continui ad aggiornare i risultati. Per i form senza cornice che aggiungono invii di testo con debounce, considera anche la correzione del focus in #2823.

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

Descrizione

blocked

🤖 From Claude:

Many filter forms submit twice on each change, sending two requests where one would do.

Why it happens

  • These forms have the collection Stimulus controller, which already submits on select/date/checkbox changes and debounces text input.
  • Their fields also carry inline onchange/oninput="this.form.requestSubmit()", so each change fires a second request.
  • Inline text oninput also skips the debounce: it submits on every keystroke.

Likely affected (inline handler + collection in the same file)

  • app/views/quotes/_search_boxes.html.erb
  • app/views/topic_subscriptions/_search_boxes.html.erb
  • app/views/staff_taggings/_search_boxes.html.erb
  • app/views/features/_search_boxes.html.erb
  • app/views/stories/_search_boxes.html.erb
  • app/views/community_news/_search_boxes.html.erb
  • app/views/monthly_reports/_search_boxes.html.erb
  • app/views/comments_and_communications/_comments_and_communications_filters.html.erb
  • app/views/author_credit_divergences/_filters.html.erb
  • app/views/categories/_search_boxes.html.erb
  • app/views/notifications/_search_boxes.html.erb

Check first

  • Other views have inline requestSubmit without collection in the same file, e.g. sectors/_search_boxes, events/_funder_filter, events/_event_search_filter.
  • Only remove the handler where the field actually sits inside a collection form; otherwise it's the only thing submitting.

Fix (done for the comments filters and workshop logs in #2815)

  • Delete the inline handler; leave submitting to collection.
  • Request spec: the filter form has no onchange=/oninput=.
  • System spec: each filter still refreshes the results.
  • For frameless forms that gain debounced text submits, pair with the focus fix in #2823.

Blocked on

  • #2815 merging (reference fix and specs).
Lingua principale
Ruby
Stelle
15
Fork
28
Merge medio
1g 12m
PR unite (30g)
262

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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.

Altre issue di rubyforgood/awbw

Tutte le issue di rubyforgood/awbw

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.