Remove inline requestSubmit handlers that double-submit collection filter forms
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, rails, ruby
Hướng nghiên cứu
Bắt đầu với các filter partial được liệt kê và xác nhận rằng mỗi inline handler nằm bên trong một form sử dụng Stimulus controller collection; issue cảnh báo rằng một số view khác phụ thuộc vào các handler này. Chờ #2815 được merge, sau đó làm theo mẫu request spec và system spec của issue đó: xác minh các handler không còn tồn tại và mỗi bộ lọc vẫn cập nhật kết quả. Với các form không có frame được bổ sung thao tác gửi văn bản có debounce, cũng cần tính đến bản sửa lỗi focus trong #2823.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🤖 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).
- Ngôn ngữ chính
- Ruby
- Star
- 15
- Fork
- 28
- Merge trung bình
- 1 ngày 12 phút
- Pull request đã merge (30 ngày)
- 262
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rubyforgood/awbw
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rubyforgood/awbw#2822 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rubyforgood/awbw#2160 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update callout faq defualt text when the new person subscription launchesCó thể đã có người làm @maebeale đã nhận 78 ngày trước. Đang mởblocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rubyforgood/awbw#2095 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
rubyforgood/awbw#2088 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Published story edit: paragraph spacing too large by default, hard to readCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởenhancement stakeholder-request stories
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
rubyforgood/awbw#1521 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rubyforgood/awbw
Issue tương tự
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
rubyaustralia/ruby_au#497 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
TheOdinProject/curriculum#31493 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày