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

未关闭
#7,278 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
67/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript, jquery, rails
领域
frontend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

🖥️ 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.

主要语言
Ruby
星标
382
派生
547
平均合并
2 天 22 小时
30 天内合并 PR
46

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rubyforgood/casa 的其他 Issue

查看 rubyforgood/casa 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。