Emancipation checklist page: convert case_emancipation.js to Stimulus + fetch
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 62/100
- Tipo de issue
- Refatoração
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, ruby
- Domínio
- frontend
Direção de pesquisa
Start by reading app/javascript/src/case_emancipation.js alongside the page it drives, app/views/emancipations/show.html.erb, and the existing controllers in app/javascript/controllers/ to see the Stimulus conventions. Port the checkbox save, category toggle and status reporting to a new emancipation_checklist_controller.js using fetch, then remove the old file and its require. Done means the system specs in spec/system/emancipations/show_spec.rb and spec/system/casa_cases/emancipation/show_spec.rb pass, npm run test passes with the rewritten tests/case_emancipations.test.js, and notifier.js is left in place for patch_notes.js.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
What
The emancipation checklist page for a case (app/views/emancipations/show.html.erb, at /casa_cases/:id/emancipation) is driven by app/javascript/src/case_emancipation.js. It's about 230 lines of jQuery: it saves each checkbox with $.post, expands and collapses categories, and reports save status through notifier.js. Convert it to a Stimulus controller that uses fetch.
Checklist
- Add
app/javascript/controllers/emancipation_checklist_controller.jswith the same behavior: check or uncheck a category or option saves right away, child options are shown or hidden, and errors are visible to the user - Replace the jQuery Notifier with the design-system flash (
shared/_flashes,alert_classes) or a small inline status. Note thatnotifier.jsis also used bypatch_notes.js, so don't delete it here - Delete
app/javascript/src/case_emancipation.jsand itsrequire. Rewrite__tests__/case_emancipations.test.js -
bundle exec rspec spec/system/emancipations/show_spec.rb spec/system/casa_cases/emancipation/show_spec.rbpasses
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.
- Linguagem predominante
- Ruby
- Estrelas
- 384
- Forks
- 558
- Merge médio
- 1d 7h
- PRs com merge (30d)
- 63
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de rubyforgood/casa
-
⛓️ Security Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
rubyforgood/casa#7404 ·
Mantenedores costumam responder em até 1 dia
-
Difficulty: Easy Good First Issue Help Wanted ruby Type: Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
rubyforgood/casa#7402 ·
Mantenedores costumam responder em até 1 dia
-
Remove the bin/bundle binstub (Heroku warns it can break Bundler on deploy)Talvez já em andamento @Akash-Dhanwate assumiu há 8 dias. Abertadependencies Difficulty: Easy Good First Issue
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
rubyforgood/casa#7325 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Reports page: move export-button disable/re-enable into a Stimulus controllerTalvez livre de novo @Akash-Dhanwate assumiu há 9 dias e não há nenhum pull request aberto. AbertaDifficulty: Easy Good First Issue Help Wanted javascript
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
rubyforgood/casa#7311 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
New case: use Stimulus for the "I don't know the court date yet" toggleTalvez livre de novo @Aryankn29 assumiu há 9 dias e não há nenhum pull request aberto. AbertaDifficulty: Easy Good First Issue Help Wanted javascript
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
rubyforgood/casa#7310 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de rubyforgood/casa
Issues semelhantes
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
internetee/registry#2984 ·
Mantenedores costumam responder em até 6 dias
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredTalvez já em andamento @mimosa assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
riscv/riscv-unified-db#2829 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
docker-library/ruby#534 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100