New case: use Stimulus for the "I don't know the court date yet" toggle

オープン 初心者向け
#7,310 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, jquery, rails
領域
frontend

調査の方向性

app/views/casa_cases/new.html.erb のチェックボックスと裁判期日の入力欄から始め、既存の reveal コントローラー(app/javascript/controllers/reveal_controller.js)が適しているか確認してください。app/javascript/src/new_casa_case.js のjQuery版が、踏襲すべき現在の動作を示しています。完了条件は、切り替えで入力欄が表示・非表示になること、両方の状態でケースが保存されること、bundle exec rspec spec/system/casa_cases/new_spec.rb が通ること、そしてjQueryファイルとそのrequireが削除されていることです。

索引モデルが issue の本文から書いたものです。

説明

Difficulty: Easy Good First Issue Help Wanted javascript

What

On /casa_cases/new, checking "I don't know the court date yet" hides the court date field. app/javascript/src/new_casa_case.js does this with jQuery. The existing reveal Stimulus controller (app/javascript/controllers/reveal_controller.js) already toggles a target when a checkbox is clicked.

Checklist

  • In app/views/casa_cases/new.html.erb, wire the toggle-court-date-input checkbox and the court date input to reveal (or a tiny new controller if reveal doesn't fit)
  • Delete app/javascript/src/new_casa_case.js and its require in app/javascript/application.js
  • As [email protected], toggle the checkbox on /casa_cases/new and confirm the field hides and shows, and that the case still saves both ways
  • bundle exec rspec spec/system/casa_cases/new_spec.rb passes

Before you start

  • Comment here to be assigned. Setup is bin/setup, then bin/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時間
マージ済み PR(30日)
46

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rubyforgood/casa のほかの issue

rubyforgood/casa の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。