☂️ Remove jQuery: convert the last legacy scripts to Stimulus

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript, jquery, rails
领域
frontend

调研方向

This is a tracker, so pick one linked sub-issue (for example #7302 or #7305) and comment to get assigned rather than working on #7301 itself. Start from app/javascript/application.js and app/javascript/all_casa_admin.js to see which legacy files in app/javascript/src/ they still require, and read MIGRATION-MAP.md. Done means the sub-issue's file is removed or converted to a Stimulus controller in app/javascript/controllers/, with npm run test and bin/lint passing.

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

描述

🖥️ Frontend Help Wanted javascript

Goal

Remove jQuery (and the libraries that only exist for it: DataTables, the SweetAlert confirm shim) from the app. New JS is Stimulus (app/javascript/controllers/).

The Bootstrap → Tailwind page migration is already done: every page renders on a Tailwind layout, see MIGRATION-MAP.md. What's left is the legacy scripts in app/javascript/src/ that app/javascript/application.js and app/javascript/all_casa_admin.js still require. Several of them now target markup the redesign removed, so they're dead code.

Each sub-issue covers one file, one page, and one PR. Comment on a sub-issue to be assigned.

Sub-issues

Easy — dead code, delete it (Good First Issue)

  • #7302 emancipations.js
  • #7303 All-CASA tables.js + datatable.js
  • #7304 remove datatables.net-dt package (after #7302, #7303)
  • #7305 read_more.js
  • #7306 sweet-alert-confirm.js

Easy — small Stimulus swaps (Good First Issue)

  • #7308 volunteer edit: SMS reactivation button styling
  • #7309 case contacts filter → auto-submit
  • #7310 new case court-date toggle → reveal
  • #7311 reports export buttons

Intermediate

  • #7307 validated_form.js (delete + check one warning)
  • #7312 profile edit: password confirmation
  • #7313 profile edit: contact-method check
  • #7314 imports page

Advanced

  • #7315 emancipation checklist page
  • #7316 All-CASA patch notes page

Last

  • #7317 remove jQuery, notifier.js, type_checker.js (after all of the above)

Done when

  • No $( / jQuery left in app/javascript/
  • jquery, datatables.net-dt removed from package.json; app/javascript/jQueryGlobalizer.js deleted
  • This makes #6685 (jQuery 4 upgrade) and #7278 (DataTables 3 upgrade) moot. Close them when the removal lands.

Tips

  • Setup: bin/setup, then bin/dev. Logins are in the README.
  • JS tests: npm run test. Ruby/system tests: bundle exec rspec spec/system/...
  • Before pushing, run bin/lint.
  • See existing controllers such as auto_submit_controller.js, reveal_controller.js and disable_form_controller.js before writing a new one. One of them may already do what you need.
主要语言
Ruby
星标
384
派生
558
平均合并
1 天 7 小时
30 天内合并 PR
63

环境准备

在 Codespaces 中打开

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

从这里开始

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

rubyforgood/casa 的其他 Issue

查看 rubyforgood/casa 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

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