All-CASA patch notes page: convert patch_notes.js to Stimulus or Turbo Frames
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, jquery, rails, ruby
- 领域
- frontend
调研方向
Start with app/javascript/src/all_casa_admin/patch_notes.js and the view app/views/all_casa_admins/patch_notes/index.html.erb, then see how app/javascript/all_casa_admin.js requires the script. The button_classes helper on the server should supply the button classes. Run spec/system/all_casa_admins/patch_notes/index_spec.rb to confirm create, edit, cancel and delete still work. Done means the jQuery file and its require are gone, and that spec passes without the raw Selenium handle. Agree on a Stimulus or Turbo Frames approach in a comment first.
由索引模型根据 Issue 内容生成。
描述
What
The All-CASA-admin patch notes page (app/views/all_casa_admins/patch_notes/index.html.erb) is driven by app/javascript/src/all_casa_admin/patch_notes.js. It's about 500 lines of jQuery that create, edit and delete patch notes inline with $.ajax, and it hand-copies the button_classes strings into JS. Convert it to Stimulus with fetch. A good alternative is plain Rails forms in Turbo Frames, which could remove most of the JS.
This is the biggest legacy script. Open a short plan comment before you start.
Checklist
- Create, edit, cancel-edit and delete all still work without a full page reload (or with Turbo Frames)
- Buttons come from the
button_classeshelper on the server, not hard-coded class strings in JS - Delete
patch_notes.jsand itsrequireinapp/javascript/all_casa_admin.js -
bundle exec rspec spec/system/all_casa_admins/patch_notes/index_spec.rbpasses. That spec also still reads a raw Selenium handle (seedesign-todo.md), which you can clean up here
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
- 星标
- 384
- 派生
- 558
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 63
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rubyforgood/casa 的其他 Issue
-
⛓️ Security Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
难度 2/5 1-3 小时 新手友好度 82/100
rubyforgood/casa#7404 ·
维护者通常 1 天内回复
-
Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
难度 2/5 1-3 小时 新手友好度 76/100
rubyforgood/casa#7402 ·
维护者通常 1 天内回复
-
Remove the bin/bundle binstub (Heroku warns it can break Bundler on deploy)可能已有人在做 @Akash-Dhanwate 于 8 天前认领。 未关闭dependencies Difficulty: Easy Good First Issue
难度 1/5 1 小时以内 新手友好度 82/100
rubyforgood/casa#7325 · 2 条评论 ·
维护者通常 1 天内回复
-
Reports page: move export-button disable/re-enable into a Stimulus controller可能重新可做 @Akash-Dhanwate 于 9 天前认领,目前没有进行中的 PR。 未关闭Difficulty: Easy Good First Issue Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 72/100
rubyforgood/casa#7311 · 2 条评论 ·
维护者通常 1 天内回复
-
New case: use Stimulus for the "I don't know the court date yet" toggle可能重新可做 @Aryankn29 于 9 天前认领,目前没有进行中的 PR。 未关闭Difficulty: Easy Good First Issue Help Wanted javascript
难度 2/5 1-3 小时 新手友好度 78/100
rubyforgood/casa#7310 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 66/100
internetee/registry#2984 ·
维护者通常 6 天内回复
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configured可能已有人在做 @mimosa 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
riscv/riscv-unified-db#2829 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
docker-library/ruby#534 ·
-
难度 2/5 1-3 小时 新手友好度 68/100