Upgrade datatables.net-dt from 1.13 to 3.x and check every table (#7248)

Đang mở
#7,278 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
67/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, jquery, rails
Lĩnh vực
frontend

Hướng nghiên cứu

Read the DataTables 2.0 and 3.0 upgrade notes, then inspect app/javascript/datatable.js, app/javascript/src/all_casa_admin/tables.js, app/javascript/src/emancipations.js, and their import in app/javascript/application.js. Run bin/dev with the README seed logins and check sorting, search, pagination, and styling on each table; rerun the named system spec on main to assess flakiness. Done means the upgrade works across the tables and the PR includes before-and-after screenshots.

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

Mô tả

🖥️ Frontend dependencies Difficulty: Intermediate Help Wanted javascript

Problem

Dependabot's #7248 bumps datatables.net-dt from 1.13.11 to 3.1.4, skipping a whole major version (2.x). Its CI failed docker with one system spec:

rspec ./spec/system/volunteers/edit_spec.rb:155  # saves the user as inactive, but only if the admin confirms
Unable to find modal dialog

That spec may just be flaky, since it isn't obviously related to tables. But a jump across two majors needs a real check of every table in the app, not only green CI.

Where DataTables is used

  • app/javascript/datatable.js: $(selector).DataTable({ searching: true, order: [[0, 'asc']] })
  • app/javascript/src/all_casa_admin/tables.js: admin and organization lists on the All CASA admin pages
  • app/javascript/src/emancipations.js: table#all-case-emancipations
  • Imported from app/javascript/application.js; styles come from the -dt package

Tasks

  • Read the DataTables 2.0 and 3.0 upgrade notes. Check how the jQuery plugin is imported and initialised, and whether the options we pass changed.
  • Check each table above in the browser (bin/dev, seed logins in the README): sorting, search box, pagination, styling
  • Rerun the volunteers/edit_spec.rb:155 system spec on main a few times. If it fails there too, it's flaky: file it per our flaky-test process instead of blocking this.
  • Open a PR with the bump plus any code changes, with before/after screenshots of each table
  • Longer term (separate issue): the redesign is moving tables to Tailwind and Stimulus, so check whether these tables still need DataTables at all

Difficulty: intermediate.

Ngôn ngữ chính
Ruby
Star
382
Fork
547
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
46

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.