Delete dead sweet-alert-confirm.js (no view uses data-confirm-swal)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 85/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, rails
- 领域
- frontend
调研方向
先在 app/views、app/components 和 app/helpers 上运行检查清单中的 grep,确认没有任何地方使用 data-confirm-swal。然后删除 app/javascript/sweet-alert-confirm.js,并从 app/javascript/application.js 中移除它的导入,保留 sweetalert2 包不动。当删除确认和联系人类型确认仍能在浏览器中显示,npm run test 通过,且 spec/system/volunteers/edit_spec.rb 为绿色时,即完成。
由索引模型根据 Issue 内容生成。
描述
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/helpersreturns nothing - Delete
app/javascript/sweet-alert-confirm.jsand remove its import fromapp/javascript/application.js - Check whether
window.Swalis still used (grep -rn "window.Swal\|Swal" app/javascript). Other files importSwaldirectly, so leave thesweetalert2package 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 testpasses, and so doesbundle exec rspec spec/system/volunteers/edit_spec.rb
Before you start
- Comment here to be assigned. Setup is
bin/setup, thenbin/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.
- 主要语言
- Ruby
- 星标
- 382
- 派生
- 547
- 平均合并
- 2 天 22 小时
- 30 天内合并 PR
- 46
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rubyforgood/casa 的其他 Issue
-
Remove leftover Cloud66 custom_web process from Procfile可能已有人在做 @ShahadatTest 今天认领。 未关闭Difficulty: Easy Good First Issue
难度 1/5 1 小时以内 新手友好度 88/100
rubyforgood/casa#7330 · 1 条评论 ·
维护者通常 1 天内回复
-
dependencies Difficulty: Easy Good First Issue
难度 1/5 1 小时以内 新手友好度 82/100
rubyforgood/casa#7325 ·
维护者通常 1 天内回复
-
Difficulty: Easy Good First Issue Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 72/100
rubyforgood/casa#7311 ·
维护者通常 1 天内回复
-
Difficulty: Easy Good First Issue Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 78/100
rubyforgood/casa#7310 ·
维护者通常 1 天内回复
-
Difficulty: Easy Good First Issue Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 78/100
rubyforgood/casa#7309 ·
维护者通常 1 天内回复
相似的 Issue
-
bug needs-triaging
难度 2/5 1-3 小时 新手友好度 70/100
SeleniumHQ/seleniumhq.github.io#2952 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
hashicorp/homebrew-tap#433 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 8 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 62/100
TheOdinProject/curriculum#31509 ·
维护者通常 1 天内回复