Remove inline requestSubmit handlers that double-submit collection filter forms
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, rails, ruby
調査の方向性
一覧にあるフィルター partial から始め、各インラインハンドラーが Stimulus コントローラー collection を使うフォーム内にあることを確認してください。Issue では、他の一部のビューがそれらのハンドラーに依存していると警告されています。#2815 がマージされるのを待ち、その request spec と system spec のパターンに従ってください。ハンドラーが存在しないことと、各フィルターが引き続き結果を更新することを確認します。フレームのないフォームにデバウンス付きのテキスト送信を追加する場合は、#2823 のフォーカス修正も考慮してください。
索引モデルが issue の本文から書いたものです。
説明
🤖 From Claude:
Many filter forms submit twice on each change, sending two requests where one would do.
Why it happens
- These forms have the
collectionStimulus 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
oninputalso skips the debounce: it submits on every keystroke.
Likely affected (inline handler + collection in the same file)
app/views/quotes/_search_boxes.html.erbapp/views/topic_subscriptions/_search_boxes.html.erbapp/views/staff_taggings/_search_boxes.html.erbapp/views/features/_search_boxes.html.erbapp/views/stories/_search_boxes.html.erbapp/views/community_news/_search_boxes.html.erbapp/views/monthly_reports/_search_boxes.html.erbapp/views/comments_and_communications/_comments_and_communications_filters.html.erbapp/views/author_credit_divergences/_filters.html.erbapp/views/categories/_search_boxes.html.erbapp/views/notifications/_search_boxes.html.erb
Check first
- Other views have inline
requestSubmitwithoutcollectionin 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
collectionform; 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).
- 主要言語
- Ruby
- スター
- 15
- フォーク
- 28
- 平均マージ
- 1日 12分
- マージ済み PR(30日)
- 262
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rubyforgood/awbw のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rubyforgood/awbw#2822 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rubyforgood/awbw#2160 ·
メンテナーはふだん 1 日以内に返信
-
Update callout faq defualt text when the new person subscription launches対応中かも @maebeale が 78 日前に担当しました。 オープンblocked
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rubyforgood/awbw#2095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
rubyforgood/awbw#2088 ·
メンテナーはふだん 1 日以内に返信
-
Published story edit: paragraph spacing too large by default, hard to read再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンenhancement stakeholder-request stories
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rubyforgood/awbw#1521 ·
メンテナーはふだん 1 日以内に返信
rubyforgood/awbw の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
TheOdinProject/curriculum#31493 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
rmosolgo/graphql-ruby#5843 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 66/100
betagouv/conseillers-entreprises#4770 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
seek4science/seek#2762 ·
メンテナーはふだん 5 日以内に返信