All-CASA patch notes page: convert patch_notes.js to Stimulus or Turbo Frames
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, jquery, rails, ruby
- Domain
- frontend
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Ruby
- Stars
- 384
- Forks
- 558
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 63
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rubyforgood/casa
-
⛓️ Security Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
rubyforgood/casa#7404 ·
Maintainers usually reply within 1 day
-
Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rubyforgood/casa#7402 ·
Maintainers usually reply within 1 day
-
Remove the bin/bundle binstub (Heroku warns it can break Bundler on deploy)Possibly taken @Akash-Dhanwate claimed this 8 days ago. Opendependencies Difficulty: Easy Good First Issue
Difficulty 1/5 Under an hour Newbie friendliness 82/100
rubyforgood/casa#7325 · 2 comments ·
Maintainers usually reply within 1 day
-
Reports page: move export-button disable/re-enable into a Stimulus controllerMay be free again @Akash-Dhanwate claimed this 9 days ago, and no pull request is open. OpenDifficulty: Easy Good First Issue Help Wanted javascript
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rubyforgood/casa#7311 · 2 comments ·
Maintainers usually reply within 1 day
-
New case: use Stimulus for the "I don't know the court date yet" toggleMay be free again @Aryankn29 claimed this 9 days ago, and no pull request is open. OpenDifficulty: Easy Good First Issue Help Wanted javascript
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rubyforgood/casa#7310 · 1 comment ·
Maintainers usually reply within 1 day
All issues in rubyforgood/casa
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
internetee/registry#2984 ·
Maintainers usually reply within 6 days
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredPossibly taken @mimosa claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
riscv/riscv-unified-db#2829 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
docker-library/ruby#534 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100