Delete dead sweet-alert-confirm.js (no view uses data-confirm-swal)

Đang mở Phù hợp với người mới
#7,306 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@KoushikSagarr đang làm issue này rồi.

Từ ngày 3/11/2026.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
85/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, rails
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu bằng cách chạy lệnh grep trong danh sách kiểm tra trên app/views, app/components và app/helpers để xác nhận không có gì dùng data-confirm-swal. Sau đó xóa app/javascript/sweet-alert-confirm.js và bỏ import của nó khỏi app/javascript/application.js, giữ nguyên gói sweetalert2. Hoàn thành khi các xác nhận xóa và loại liên hệ vẫn hiển thị trên trình duyệt, npm run test chạy thành công và spec/system/volunteers/edit_spec.rb xanh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Difficulty: Easy Good First Issue javascript

What

app/javascript/sweet-alert-confirm.js hooks Rails UJS so that links with data-confirm-swal show a SweetAlert. No view uses data-confirm-swal any more: confirmations now go through shared/_confirm_button (a native dialog) or plain data-confirm.

Checklist

  • Confirm grep -rn "confirm-swal\|confirm_swal" app/views app/components app/helpers returns nothing
  • Delete app/javascript/sweet-alert-confirm.js and remove its import from app/javascript/application.js
  • Check whether window.Swal is still used (grep -rn "window.Swal\|Swal" app/javascript). Other files import Swal directly, so leave the sweetalert2 package alone in this PR
  • Click a delete button (for example on a contact type) and a deactivate button (on a volunteer's edit page) and confirm both confirmations still appear
  • npm run test passes, and so does bundle exec rspec spec/system/volunteers/edit_spec.rb

Before you start

  • Comment here to be assigned. Setup is bin/setup, then bin/dev. Logins are in the README.
  • JS tests: npm run test. Lint: bin/lint.
  • Part of #7301 (removing jQuery). Keep this PR to just this file.
Ngôn ngữ chính
Ruby
Star
383
Fork
551
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
49

Chuẩn bị môi trường

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rubyforgood/casa

Tất cả issue của rubyforgood/casa

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.